mirror of
https://github.com/Relintai/codot.git
synced 2025-04-22 05:41:17 +02:00
Generate compile db.
This commit is contained in:
parent
b1a9ca27da
commit
a1f1ceee7b
12
SConstruct
12
SConstruct
@ -72,6 +72,18 @@ env_base.Prepend(CPPPATH=["#"])
|
|||||||
|
|
||||||
env = env_base.Clone()
|
env = env_base.Clone()
|
||||||
|
|
||||||
|
use_compile_db = True
|
||||||
|
|
||||||
|
if use_compile_db:
|
||||||
|
# Generating the compilation DB (`compile_commands.json`) requires SCons 4.0.0 or later.
|
||||||
|
from SCons import __version__ as scons_raw_version
|
||||||
|
|
||||||
|
scons_ver = env._get_major_minor_revision(scons_raw_version)
|
||||||
|
|
||||||
|
if scons_ver >= (4, 0, 0):
|
||||||
|
env.Tool("compilation_db")
|
||||||
|
env.Alias("compiledb", env.CompilationDatabase())
|
||||||
|
|
||||||
# Environment flags
|
# Environment flags
|
||||||
CCFLAGS = env.get("CCFLAGS", "")
|
CCFLAGS = env.get("CCFLAGS", "")
|
||||||
env["CCFLAGS"] = ""
|
env["CCFLAGS"] = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user