mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Fix issue with "CPPDEFINES" which contain space and break PlatformIO IDE Linter
This commit is contained in:
@ -7,7 +7,7 @@ PlatformIO 2.0
|
|||||||
2.8.4 (2016-02-??)
|
2.8.4 (2016-02-??)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
* Temporary disabled ``CPPDEFINES`` which contain space and break PlatformIO
|
* Fixed issue with ``CPPDEFINES`` which contain space and break PlatformIO
|
||||||
IDE Linter
|
IDE Linter
|
||||||
(`IDE issue #34 <https://github.com/platformio/platformio-atom-ide/issues/34>`_)
|
(`IDE issue #34 <https://github.com/platformio/platformio-atom-ide/issues/34>`_)
|
||||||
|
|
||||||
|
@ -215,14 +215,7 @@ def DumpIDEData(env):
|
|||||||
|
|
||||||
env_ = env.Clone()
|
env_ = env.Clone()
|
||||||
|
|
||||||
# TODO tmp fix https://github.com/platformio/platformio-atom-ide/issues/34
|
data = {
|
||||||
_new_defines = []
|
|
||||||
for item in env_.get("CPPDEFINES", []):
|
|
||||||
if " " not in item:
|
|
||||||
_new_defines.append(item)
|
|
||||||
env_.Replace(CPPDEFINES=_new_defines)
|
|
||||||
|
|
||||||
return {
|
|
||||||
"defines": get_defines(env_),
|
"defines": get_defines(env_),
|
||||||
"includes": get_includes(env_),
|
"includes": get_includes(env_),
|
||||||
"cc_flags": env_.subst("$SHCFLAGS $SHCCFLAGS $CPPFLAGS $_CPPDEFFLAGS"),
|
"cc_flags": env_.subst("$SHCFLAGS $SHCCFLAGS $CPPFLAGS $_CPPDEFFLAGS"),
|
||||||
@ -232,6 +225,23 @@ def DumpIDEData(env):
|
|||||||
env_.subst("$CXX"), env_.subst("${ENV['PATH']}"))
|
env_.subst("$CXX"), env_.subst("${ENV['PATH']}"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# https://github.com/platformio/platformio-atom-ide/issues/34
|
||||||
|
_new_defines = []
|
||||||
|
for item in env_.get("CPPDEFINES", []):
|
||||||
|
if " " in item:
|
||||||
|
_new_defines.append(item.replace(" ", "\\\\ "))
|
||||||
|
else:
|
||||||
|
_new_defines.append(item)
|
||||||
|
env_.Replace(CPPDEFINES=_new_defines)
|
||||||
|
|
||||||
|
data.update({
|
||||||
|
"cc_flags": env_.subst("$SHCFLAGS $SHCCFLAGS $CPPFLAGS $_CPPDEFFLAGS"),
|
||||||
|
"cxx_flags": env_.subst(
|
||||||
|
"$SHCXXFLAGS $SHCCFLAGS $CPPFLAGS $_CPPDEFFLAGS")
|
||||||
|
})
|
||||||
|
|
||||||
|
return data
|
||||||
|
|
||||||
|
|
||||||
def GetCompilerType(env):
|
def GetCompilerType(env):
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user