diff --git a/SConscript b/SConscript index 40f4964..915d3e3 100644 --- a/SConscript +++ b/SConscript @@ -401,6 +401,9 @@ if not config.get('CXX_STANDARD'): if not config.get('PREPROCESSOR_PREFIX'): config['PREPROCESSOR_PREFIX'] = config['PROJECT_NAME'].upper() # TODO: may be nicer? +if 'COMPILATIONDB_FILTER_FILES' not in config: + config['COMPILATIONDB_FILTER_FILES'] = True + AddOption( '--build_type', dest = 'build_type', @@ -496,7 +499,8 @@ vars.Add('CFLAGS', 'C Compiler Flags') vars.Add('CXXFLAGS', 'C++ Compiler Flags') vars.Add('LINKFLAGS', 'Linker Flags') vars.Add('PYTHON', 'Python Executable', 'python') -vars.Add('COMPILATIONDB_FILTER_FILES', 'Removes source files from the compilation DB that are not from the current project.', True) +vars.Add('COMPILATIONDB_FILTER_FILES', 'Removes source files from the compilation DB that are not from the current' + ' project.', config['COMPILATIONDB_FILTER_FILES']) tools = ['default', 'compilation_db', 'unity_build'] if 'TOOLS' in config: