summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct7
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=["#"])