From f65a1d8642381193c3673c3642a2f7b2b1bafddb Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 6 Jun 2020 12:23:29 -0700 Subject: [ci skip] Updates to docs --- SCons/Tool/compilation_db.xml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/SCons/Tool/compilation_db.xml b/SCons/Tool/compilation_db.xml index 12a4db0..1aec177 100644 --- a/SCons/Tool/compilation_db.xml +++ b/SCons/Tool/compilation_db.xml @@ -26,14 +26,7 @@ See its __doc__ string for a discussion of the format. - Sets up &b-CompilationDatabase; builder. - - - This builder generates a clang tooling compatible compilation database. - - - Note: The target file is typically named - compile_commands.json. + Sets up &b-CompilationDatabase; builder which generates a clang tooling compatible compilation database. @@ -52,10 +45,25 @@ See its __doc__ string for a discussion of the format. The &b-CompilationDatabase; builder writes a clang formatted compilation database - + which is consumed by a number of clang tools, editors, and other tools. + + + If you don't specify any files, the builder will default to compile_commands.json. + + + If you specify a single file as below + +env.CompilationDatabase('my_output.json') + + SCons will automatically use that as the target file. + If you specify more than one source, the source list will be ignored. + + + You should not specify source files. The &b-CompilationDatabase; builder instruments SCons to collect them from all + the C, C++, assembly source/target pairs. - This is consumed by a number of clang tools. + New in &SCons; 4.0.0 -- cgit v0.12