mirror of https://github.com/ARMmbed/mbed-os.git
Correctly format include paths for eclipse export
Eclipse CDT expects the include paths to include the project name like '/<project>/<include-path>' for workspace include directories. See issue #3529.pull/3531/head
parent
e7361ebc44
commit
b668185339
|
@ -1,3 +1,5 @@
|
||||||
|
import re
|
||||||
|
|
||||||
from os.path import join, exists, realpath, relpath, basename
|
from os.path import join, exists, realpath, relpath, basename
|
||||||
from os import makedirs
|
from os import makedirs
|
||||||
|
|
||||||
|
@ -12,13 +14,14 @@ class Eclipse(Makefile):
|
||||||
py_ocd_settings launch file, and software link .p2f file
|
py_ocd_settings launch file, and software link .p2f file
|
||||||
"""
|
"""
|
||||||
super(Eclipse, self).generate()
|
super(Eclipse, self).generate()
|
||||||
|
include_paths_replace_re= re.compile(r'(^[.]/|^[.]$)')
|
||||||
ctx = {
|
ctx = {
|
||||||
'name': self.project_name,
|
'name': self.project_name,
|
||||||
'elf_location': join('BUILD',self.project_name)+'.elf',
|
'elf_location': join('BUILD',self.project_name)+'.elf',
|
||||||
'c_symbols': self.toolchain.get_symbols(),
|
'c_symbols': self.toolchain.get_symbols(),
|
||||||
'asm_symbols': self.toolchain.get_symbols(True),
|
'asm_symbols': self.toolchain.get_symbols(True),
|
||||||
'target': self.target,
|
'target': self.target,
|
||||||
'include_paths': self.resources.inc_dirs,
|
'include_paths': map(lambda s: include_paths_replace_re.sub('%s/' % self.project_name, s), self.resources.inc_dirs),
|
||||||
'load_exe': str(self.LOAD_EXE).lower()
|
'load_exe': str(self.LOAD_EXE).lower()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue