Update templates for Atom, VSCode, CLion (#3371)

* Wrap flags with whitespace chars when exporting data for IDEs

* Update IDEs templates

Take into account compiler flags that can contain whitespace characters (e.g. -iprefix)

* Update template for VSCode

* Add history record
This commit is contained in:
Valerii Koval
2020-02-07 11:26:45 +02:00
committed by GitHub
parent fe174e35c8
commit 0b0b63aa7d
5 changed files with 57 additions and 11 deletions
+9 -2
View File
@@ -138,9 +138,16 @@ def _get_svd_path(env):
return None
def _escape_build_flag(flags):
return [flag if " " not in flag else '"%s"' % flag for flag in flags]
def DumpIDEData(env):
LINTCCOM = "$CFLAGS $CCFLAGS $CPPFLAGS"
LINTCXXCOM = "$CXXFLAGS $CCFLAGS $CPPFLAGS"
env["__escape_build_flag"] = _escape_build_flag
LINTCCOM = "${__escape_build_flag(CFLAGS)} ${__escape_build_flag(CCFLAGS)} $CPPFLAGS"
LINTCXXCOM = "${__escape_build_flag(CXXFLAGS)} ${__escape_build_flag(CCFLAGS)} $CPPFLAGS"
data = {
"env_name": env["PIOENV"],