Merge branch 'develop' into feature/platformio-30
* develop: Remove debug info Add "Rebuild C/C++ Project Index" target to CLion and Eclipse IDEs Iterating the dictionary directly instead of calling .keys() Iterating the dictionary directly instead of calling .keys() Add example dynamic `build_flags` Add new articles Update examples
This commit is contained in:
@@ -163,7 +163,7 @@ def DumpIDEData(env):
|
||||
|
||||
# includes from toolchains
|
||||
p = env.DevPlatform()
|
||||
for name in p.get_installed_packages().keys():
|
||||
for name in p.get_installed_packages():
|
||||
if p.get_package_type(name) != "toolchain":
|
||||
continue
|
||||
toolchain_dir = p.get_package_dir(name)
|
||||
@@ -179,7 +179,9 @@ def DumpIDEData(env):
|
||||
def get_defines(env_):
|
||||
defines = []
|
||||
# global symbols
|
||||
for item in env.Flatten(env_.get("CPPDEFINES", [])):
|
||||
for item in env_.get("CPPDEFINES", []):
|
||||
if isinstance(item, list) or isinstance(item, tuple):
|
||||
item = "=".join(item)
|
||||
defines.append(env_.subst(item).replace('\\"', '"'))
|
||||
|
||||
# special symbol for Atmel AVR MCU
|
||||
@@ -200,13 +202,17 @@ def DumpIDEData(env):
|
||||
"includes": get_includes(env_),
|
||||
"cc_flags": env_.subst(LINTCCOM),
|
||||
"cxx_flags": env_.subst(LINTCXXCOM),
|
||||
"cc_path": util.where_is_program(
|
||||
env_.subst("$CC"), env_.subst("${ENV['PATH']}")),
|
||||
"cxx_path": util.where_is_program(
|
||||
env_.subst("$CXX"), env_.subst("${ENV['PATH']}"))
|
||||
}
|
||||
|
||||
# https://github.com/platformio/platformio-atom-ide/issues/34
|
||||
_new_defines = []
|
||||
for item in env.Flatten(env_.get("CPPDEFINES", [])):
|
||||
for item in env_.get("CPPDEFINES", []):
|
||||
if isinstance(item, list) or isinstance(item, tuple):
|
||||
item = "=".join(item)
|
||||
item = item.replace('\\"', '"')
|
||||
if " " in item:
|
||||
_new_defines.append(item.replace(" ", "\\\\ "))
|
||||
|
||||
Reference in New Issue
Block a user