forked from platformio/platformio-core
Fix missing include paths for check tools
Includes are now split by scopes and imported as a dictionary
This commit is contained in:
@ -58,7 +58,7 @@ class CheckToolBase(object): # pylint: disable=too-many-instance-attributes
|
||||
return
|
||||
self.cc_flags = data.get("cc_flags", "").split(" ")
|
||||
self.cxx_flags = data.get("cxx_flags", "").split(" ")
|
||||
self.cpp_includes = data.get("includes", [])
|
||||
self.cpp_includes = self._dump_includes(data.get("includes", {}))
|
||||
self.cpp_defines = data.get("defines", [])
|
||||
self.cc_path = data.get("cc_path")
|
||||
self.cxx_path = data.get("cxx_path")
|
||||
@ -91,6 +91,15 @@ class CheckToolBase(object): # pylint: disable=too-many-instance-attributes
|
||||
|
||||
return defines
|
||||
|
||||
@staticmethod
|
||||
def _dump_includes(includes_map):
|
||||
result = []
|
||||
for includes in includes_map.values():
|
||||
for include in includes:
|
||||
if include not in result:
|
||||
result.append(include)
|
||||
return result
|
||||
|
||||
@staticmethod
|
||||
def is_flag_set(flag, flags):
|
||||
return any(flag in f for f in flags)
|
||||
|
Reference in New Issue
Block a user