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.
(cherry picked from commit 5a6f275b74)
This commit is contained in:
committed by
Rémi Verschelde
parent
35d95918ae
commit
9aa4648579
@ -258,6 +258,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"
|
||||
|
||||
Reference in New Issue
Block a user