Skip to content

Commit 69b2d3f

Browse files
committed
Print a warning with unknown SCons variables to ease troubleshooting
When disabling specific modules, misspellings can occur. Additionally, when switching between the `3.x` and `master` branches frequently, it's possible to forget about renamed modules such as `lightmapper_cpu` versus `lightmapper_rd`.
1 parent ed02b8a commit 69b2d3f

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)