Skip to content

Commit d619c61

Browse files
authored
Merge pull request #661 from Calinou/scons-warn-unknown-variables
2 parents adbc0bf + 1e2eafe commit d619c61

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

SConstruct

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ opts.Add(BoolVariable("generate_template_get_node", "Generate a template version
147147
opts.Update(env)
148148
Help(opts.GenerateHelpText(env))
149149

150+
# Detect and print a warning listing unknown SCons variables to ease troubleshooting.
151+
unknown = opts.UnknownVariables()
152+
if unknown:
153+
print("WARNING: Unknown SCons variables were passed and will be ignored:")
154+
for item in unknown.items():
155+
print(" " + item[0] + "=" + item[1])
156+
150157
# This makes sure to keep the session environment variables on Windows.
151158
# This way, you can run SCons in a Visual Studio 2017 prompt and it will find
152159
# all the required tools

0 commit comments

Comments
 (0)