From ecb8ea9a74105486fef6a840783d90c45631b1d6 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Sun, 18 Aug 2024 11:15:32 +0200 Subject: [PATCH] Allow settings COMPILATIONDB_FILTER_FILES via config. --- SConscript | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SConscript b/SConscript index 06ce767..b98f9a7 100644 --- a/SConscript +++ b/SConscript @@ -159,6 +159,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', @@ -254,7 +257,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: