summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2016-06-14 14:15:22 -0400
committerMathias Stearn <mathias@10gen.com>2016-06-15 16:40:09 -0400
commitd3a6556ae3b98aa330d084502257ff9134be751a (patch)
treeb563b3bcdef63cf98b9ca855b481022eb110e064 /SConstruct
parent0aff7dc5e6a82de2bf41756e6bb8586c9ea0eeb3 (diff)
downloadmongo-d3a6556ae3b98aa330d084502257ff9134be751a.tar.gz
SERVER-24565 unbreak scons --help on scons<2.4
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct11
1 files changed, 9 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 64db0414855..3af8e126bac 100644
--- a/SConstruct
+++ b/SConstruct
@@ -739,8 +739,15 @@ variables_only_env = Environment(
# don't run configure if user calls --help
if GetOption('help'):
- Help('\nThe following variables may also be set like scons VARIABLE=value\n', append=True);
- Help(env_vars.GenerateHelpText(variables_only_env), append=True);
+ try:
+ Help('\nThe following variables may also be set like scons VARIABLE=value\n', append=True)
+ Help(env_vars.GenerateHelpText(variables_only_env), append=True)
+ except TypeError:
+ # The append=true kwarg is only supported in scons>=2.4. Without it, calls to Help() clobber
+ # the automatically generated options help, which we don't want. Users on older scons
+ # versions will need to use --variables-help to learn about which variables we support.
+ pass
+
Return()
if ('CC' in variables_only_env) != ('CXX' in variables_only_env):