From 6c5e085d1317df8576b78f0f0ca90a2fff364664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 2 Sep 2022 10:32:10 +0200 Subject: SCons: Enforce version 4.0+ when `compiledb=yes` is used Fixes #65233. --- SConstruct | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 4972b21421..46942ca3b4 100644 --- a/SConstruct +++ b/SConstruct @@ -444,9 +444,12 @@ if selected_platform in platform_list: 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()) + 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()) # 'dev' and 'production' are aliases to set default options if they haven't been set # manually by the user. -- cgit v1.2.3