From 8eb0c6c14bd12286d06962d0a97acfbcc7862afd Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Sat, 11 Nov 2023 15:29:15 -0500 Subject: Fix compiledb warning --- SConstruct | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 4d96e4a..ca4729c 100644 --- a/SConstruct +++ b/SConstruct @@ -52,9 +52,11 @@ library = None env["OBJSUFFIX"] = suffix + env["OBJSUFFIX"] library_name = "libopenvic-simulation{}{}".format(suffix, env["LIBSUFFIX"]) +default_args = [] + if env["build_ovsim_library"]: library = env.StaticLibrary(target=env.File(os.path.join(BINDIR, library_name)), source=sources) - Default(library) + default_args += [library] env.Append(LIBPATH=[env.Dir(BINDIR)]) env.Prepend(LIBS=[library_name]) @@ -80,8 +82,13 @@ if env["build_ovsim_headless"]: source=headless_env.headless_sources, PROGSUFFIX=".headless" + env["PROGSUFFIX"] ) - Default(headless_program) + default_args += [headless_program] + +# Add compiledb if the option is set +if env.get("compiledb", False): + default_args += ["compiledb"] +Default(*default_args) if "env" in locals(): # FIXME: This method mixes both cosmetic progress stuff and cache handling... -- cgit v1.2.3-56-ga3b1