-# These are the compilation flags that will be used in case there's no
-# compilation database set (by default, one is not set).
-# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
-flags = [
-'-Wall',
-# '-Wextra',
-# '-Wshadow',
-# '-Werror',
-# '-Wc++98-compat',
-# '-Wno-long-long',
-# '-Wno-variadic-macros',
-# '-fexceptions',
-# '-DNDEBUG',
-'-std=c++11',
-'-stdlib=libc++',
-'-x', 'c++',
-'-I', '.',
-'-I', './include',
-'-isystem', '/usr/include/c++/4.9.0',
-'-isystem', '/usr/include/c++/4.9.0/x86_64-unknown-linux-gnu',
-'-isystem', '/usr/include/c++/4.9.0/backward',
-'-isystem', '/usr/lib/clang/3.4.1/include'
-]
+def FlagsForFile( filename, **kwargs ):
+ client_data = kwargs['client_data']
+ cwd = client_data['getcwd()']
+ # These are the compilation flags that will be used in case there's no
+ # compilation database set (by default, one is not set).
+ flags = [
+ '-Wall',
+ # '-Wextra',
+ # '-Wshadow',
+ # '-Werror',
+ # '-Wc++98-compat',
+ # '-Wno-long-long',
+ # '-Wno-variadic-macros',
+ # '-fexceptions',
+ # '-DNDEBUG',
+ '-std=c++11',
+ '-stdlib=libc++',
+ '-x', 'c++',
+ '-I', '.',
+ '-I', './include',
+ '-isystem', '/usr/include/c++/4.9.0',
+ '-isystem', '/usr/include/c++/4.9.0/x86_64-unknown-linux-gnu',
+ '-isystem', '/usr/include/c++/4.9.0/backward',
+ '-isystem', '/usr/lib/clang/3.4.1/include'
+ ]
+ flags += rospack()
+ relative_to = cwd
+ final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )
+ print flags
+
+ return {
+ 'flags': final_flags,
+ 'do_cache': True
+ }