SCons: Enforce version 4.0+ when compiledb=yes is used

Fixes #65233.
This commit is contained in:
Rémi Verschelde
2022-09-02 10:32:10 +02:00
parent 9142904c24
commit 6c5e085d13

View File

@ -444,7 +444,10 @@ if selected_platform in platform_list:
scons_ver = env._get_major_minor_revision(scons_raw_version)
if scons_ver >= (4, 0, 0):
if scons_ver < (4, 0, 0):
print("The `compiledb=yes` option requires SCons 4.0 or later, but your version is %s." % scons_raw_version)
Exit(255)
env.Tool("compilation_db")
env.Alias("compiledb", env.CompilationDatabase())