Skip to content

Commit

Permalink
Make sure not to generate the compile_commands.json when not asked
Browse files Browse the repository at this point in the history
  • Loading branch information
hakro committed Aug 9, 2024
1 parent c73ac74 commit c6a5f6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ if env["compiledb"] and env.scons_version < (4, 0, 0):
# Generating the compilation DB (`compile_commands.json`) requires SCons 4.0.0 or later.
print_error("The `compiledb=yes` option requires SCons 4.0 or later, but your version is %s." % scons_raw_version)
Exit(255)
if env.scons_version >= (4, 0, 0):
if env["compiledb"] and env.scons_version >= (4, 0, 0):
env.Tool("compilation_db")
env.Alias("compiledb", env.CompilationDatabase())

Expand Down

0 comments on commit c6a5f6a

Please sign in to comment.