%scons; %builders-mod; %functions-mod; %tools-mod; %variables-mod; ]> Sets up &b-link-CompilationDatabase; builder which generates a clang tooling compatible compilation database. COMPILATIONDB_COMSTR COMPILATIONDB_USE_ABSPATH COMPILATIONDB_PATH_FILTER &b-CompilationDatabase; is a special builder which adds a target to create a JSON formatted compilation database compatible with clang tooling (see the LLVM specification). This database is suitable for consumption by various tools and editors who can use it to obtain build and dependency information which otherwise would be internal to &SCons;. The builder does not require any source files to be specified, rather it arranges to emit information about all of the C, C++ and assembler source/output pairs identified in the build that are not excluded by the optional filter &cv-link-COMPILATIONDB_PATH_FILTER;. The target is subject to the usual &SCons; target selection rules. If called with no arguments, the builder will default to a target name of compile_commands.json. If called with a single positional argument, &scons; will "deduce" the target name from that source argument, giving it the same name, and then ignore the source. This is the usual way to call the builder if a non-default target name is wanted. If called with either the target= or source= keyword arguments, the value of the argument is taken as the target name. If called with both, the target= value is used and source= is ignored. If called with multiple sources, the source list will be ignored, since there is no way to deduce what the intent was; in this case the default target name will be used. You must load the &t-compilation_db; tool prior to specifying any part of your build or some source/output files will not show up in the compilation database. Available since &scons; 4.0. The string displayed when the &b-link-CompilationDatabase; builder's action is run. A boolean flag to instruct &b-link-CompilationDatabase; whether to write the file and output members in the compilation database using absolute or relative paths. The default value is False (use relative paths) A string which instructs &b-link-CompilationDatabase; to only include entries where the output member matches the pattern in the filter string using fnmatch, which uses glob style wildcards. The default value is an empty string '', which disables filtering.