summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-08-19 21:44:47 -0700
committerWilliam Deegan <bill@baddogconsulting.com>2017-08-19 21:44:47 -0700
commit88d205705546d6147083440aa6e368387fa21fb5 (patch)
tree459e9cfa43751ec604bf9c3a556f023e4d65e502
parent6dfa17c497c1d23054ee57f169943de65467ee6b (diff)
downloadscons-88d205705546d6147083440aa6e368387fa21fb5.tar.gz
Fix Bug #2486 - Allow SetOption('silent',True) - Previously this option could not be passed to SetOption
-rw-r--r--src/CHANGES.txt1
-rw-r--r--src/engine/SCons/Script/SConsOptions.py1
-rw-r--r--test/option-s.py14
3 files changed, 16 insertions, 0 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 1c99acf0..47f74313 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -37,6 +37,7 @@ may cause rebuilds. In no case should rebuilds not happen.
for many builds when upgrading to SCons 3.0
- Fixed Bug #3027 - "Cross Compiling issue: cannot override ranlib"
- Fixed Bug #3020 - "Download link in user guide wrong. python setup.py install --version-lib broken"
+ - Fixed Bug #2486 - Added SetOption('silent',True) - Previously this value was not allowed to be set.
From Ibrahim Esmat:
- Added the capability to build Windows Store Compatible libraries that can be used
diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py
index 288a7a5a..60d456e3 100644
--- a/src/engine/SCons/Script/SConsOptions.py
+++ b/src/engine/SCons/Script/SConsOptions.py
@@ -139,6 +139,7 @@ class SConsValues(optparse.Values):
'random',
'stack_size',
'warn',
+ 'silent'
]
def set_option(self, name, value):
diff --git a/test/option-s.py b/test/option-s.py
index bbde2d14..df7cd506 100644
--- a/test/option-s.py
+++ b/test/option-s.py
@@ -41,6 +41,11 @@ file.close()
test.write('SConstruct', """
MyBuild = Builder(action = r'%(_python_)s build.py $TARGET')
+
+silent = ARGUMENTS.get('QUIET',0)
+if silent:
+ SetOption('silent',True)
+
env = Environment(BUILDERS = { 'MyBuild' : MyBuild })
env.MyBuild(target = 'f1.out', source = 'f1.in')
env.MyBuild(target = 'f2.out', source = 'f2.in')
@@ -72,6 +77,15 @@ test.subdir( 'sub' )
test.write(['sub','SConstruct'],"")
test.run(arguments = '-s -C sub', stdout = "" )
+test.unlink('f1.out')
+test.unlink('f2.out')
+
+test.run(arguments = 'QUIET=1 f1.out f2.out', stdout = "scons: Reading SConscript files ...\nscons: done reading SConscript files.\n")
+test.fail_test(not os.path.exists(test.workpath('f1.out')))
+test.fail_test(not os.path.exists(test.workpath('f2.out')))
+
+
+
test.pass_test()