Skip to content

Commit 43f53f4

Browse files
authored
Merge pull request #55203 from Calinou/scons-warn-unknown-variables
2 parents 70d5300 + 69b2d3f commit 43f53f4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

SConstruct

+7
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,13 @@ opts.Update(env_base)
300300
env_base["platform"] = selected_platform # Must always be re-set after calling opts.Update().
301301
Help(opts.GenerateHelpText(env_base))
302302

303+
# Detect and print a warning listing unknown SCons variables to ease troubleshooting.
304+
unknown = opts.UnknownVariables()
305+
if unknown:
306+
print("WARNING: Unknown SCons variables were passed and will be ignored:")
307+
for item in unknown.items():
308+
print(" " + item[0] + "=" + item[1])
309+
303310
# add default include paths
304311

305312
env_base.Prepend(CPPPATH=["#"])

0 commit comments

Comments
 (0)