diff options
author | RevoluPowered <gordon@gordonite.tech> | 2019-11-02 14:21:21 +0000 |
---|---|---|
committer | Gordon MacPherson <gordon@gordonite.tech> | 2020-05-12 13:07:50 +0200 |
commit | 5a6f275b7498e85dc74ecbc14cf264260a2218fa (patch) | |
tree | cc564d2423fe7dcb6d075d5ebdd32a6f8eed8bca /SConstruct | |
parent | 092b2bd36f9907c3d3d7687a66e5624f669c661a (diff) |
Added compilation database support for clang and gcc
This tool is originally from mongodb.
- Updated CPPSUFFIXES to use scons suffixes
- objective-c files will also be loaded into the compilation database where the compiler / tooling is available to compile the files.
Known limitations:
- This will not work with msvc as your compiler.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 0c91399a12..86014b8160 100644 --- a/SConstruct +++ b/SConstruct @@ -272,6 +272,15 @@ if selected_platform in platform_list: else: env = env_base.Clone() + # Custom tools are loaded automatically by SCons from site_scons/site_tools, + # but we want to use a different folder, so we register it manually. + from SCons.Script.Main import _load_site_scons_dir + + _load_site_scons_dir(".", "misc/scons") + + env.Tool("compilation_db") + env.Alias("compiledb", env.CompilationDatabase("compile_commands.json")) + if env["dev"]: env["verbose"] = True env["warnings"] = "extra" |