Merge pull request #1230 from adamscott/compiledb-alias
Refactor compiledb implementationpull/1277/head
commit
7a260f5e93
|
@ -274,7 +274,6 @@ def generate(env):
|
||||||
env["OBJSUFFIX"] = suffix + env["OBJSUFFIX"]
|
env["OBJSUFFIX"] = suffix + env["OBJSUFFIX"]
|
||||||
|
|
||||||
# compile_commands.json
|
# compile_commands.json
|
||||||
if env.get("compiledb", False):
|
|
||||||
env.Tool("compilation_db")
|
env.Tool("compilation_db")
|
||||||
env.Alias("compiledb", env.CompilationDatabase(normalize_path(env["compiledb_file"], env)))
|
env.Alias("compiledb", env.CompilationDatabase(normalize_path(env["compiledb_file"], env)))
|
||||||
|
|
||||||
|
@ -315,7 +314,13 @@ def _godot_cpp(env):
|
||||||
|
|
||||||
if env["build_library"]:
|
if env["build_library"]:
|
||||||
library = env.StaticLibrary(target=env.File("bin/%s" % library_name), source=sources)
|
library = env.StaticLibrary(target=env.File("bin/%s" % library_name), source=sources)
|
||||||
env.Default(library)
|
default_args = [library]
|
||||||
|
|
||||||
|
# Add compiledb if the option is set
|
||||||
|
if env.get("compiledb", False):
|
||||||
|
default_args += ["compiledb"]
|
||||||
|
|
||||||
|
env.Default(*default_args)
|
||||||
|
|
||||||
env.AppendUnique(LIBS=[env.File("bin/%s" % library_name)])
|
env.AppendUnique(LIBS=[env.File("bin/%s" % library_name)])
|
||||||
return library
|
return library
|
||||||
|
|
Loading…
Reference in New Issue