'-I', '.',
'-I', './include',
]
- flags += rospack()
relative_to = cwd
final_flags = MakeRelativePathsInFlagsAbsolute(flags, relative_to)
'do_cache': True
}
-# This function makes it easy to pull in additional flags from rospack
-def rospack():
- cmd = ['rospack', 'cflags-only-I']
- try:
- out = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE).stdout
- except:
- return []
- line = out.readline()[:-1].split(" ")
- includes = []
- for include in line:
- if include.startswith(os.path.expanduser('~')):
- includes += ['-I', include]
- else:
- includes += ['-isystem', include]
- return filter(lambda a: a != ' ', includes)
-
def DirectoryOfThisScript():
return os.path.dirname(os.path.abspath(__file__))