diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-11-21 17:32:15 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-11-21 17:32:15 +0100 |
commit | 69b2d3f7914e5823e4e0848c1bcc3d15a1cfa7a1 (patch) | |
tree | 76fecb43812b1e26f41050dbf9b7b91c5d7a957f /SConstruct | |
parent | ed02b8af59fceb48798c857306335fe0f7ff6a8a (diff) |
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`.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index f7d589e799..83bd1560ff 100644 --- a/SConstruct +++ b/SConstruct @@ -300,6 +300,13 @@ opts.Update(env_base) env_base["platform"] = selected_platform # Must always be re-set after calling opts.Update(). Help(opts.GenerateHelpText(env_base)) +# Detect and print a warning listing unknown SCons variables to ease troubleshooting. +unknown = opts.UnknownVariables() +if unknown: + print("WARNING: Unknown SCons variables were passed and will be ignored:") + for item in unknown.items(): + print(" " + item[0] + "=" + item[1]) + # add default include paths env_base.Prepend(CPPPATH=["#"]) |