From e089c4a546da3b1bd0a56c5a44c00a96f5fdad63 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 29 Mar 2019 21:26:45 +0200 Subject: [PATCH] Project Generator: fixed a VSCode C/C++'s "Cannot find" warning when CPPPATH folder does not exist --- HISTORY.rst | 5 +++++ .../ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index fb17416e..17b53191 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,6 +13,11 @@ PlatformIO 4.0 PlatformIO 3.0 -------------- +3.6.7 (2019-??-??) +~~~~~~~~~~~~~~~~~~ + +* Project Generator: fixed a VSCode C/C++'s "Cannot find" warning when CPPPATH folder does not exist + 3.6.6 (2019-03-29) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl b/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl index 75d77ffd..c91ab548 100644 --- a/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl +++ b/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl @@ -5,7 +5,7 @@ }, { % import platform -% from os.path import commonprefix, dirname +% from os.path import commonprefix, dirname, isdir % % systype = platform.system().lower() % @@ -15,7 +15,7 @@ % % cleaned_includes = [] % for include in includes: -% if "toolchain-" not in dirname(commonprefix([include, cc_path])): +% if "toolchain-" not in dirname(commonprefix([include, cc_path])) and isdir(include): % cleaned_includes.append(include) % end % end @@ -65,7 +65,7 @@ % if cxx_stds: "cppStandard": "c++{{ cxx_stds[-1] }}", % end - "compilerPath": "{{! _escape(cc_path) }} {{! _escape(cc_m_flags) }}" + "compilerPath": "\"{{! _escape(cc_path) }}\" {{! _escape(cc_m_flags) }}" } ] } \ No newline at end of file