Don't fail on missing sudo or valgrind
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Wed, 21 Sep 2011 19:10:14 +0100
changeset 7524 b5df4870db14
parent 7523 7c6a89520349
child 7525 9a36f1d5d229
Don't fail on missing sudo or valgrind
wscript
--- a/wscript	Wed Sep 21 18:52:12 2011 +0100
+++ b/wscript	Wed Sep 21 19:10:14 2011 +0100
@@ -388,7 +388,10 @@
     conf.sub_config('src/mpi')
 
     # for suid bits
-    conf.find_program('sudo', var='SUDO')
+    try:
+        conf.find_program('sudo', var='SUDO')
+    except WafError:
+        pass
 
     why_not_sudo = "because we like it"
     if Options.options.enable_sudo and conf.env['SUDO']:
@@ -452,7 +455,10 @@
     conf.report_optional_feature("ENABLE_EXAMPLES", "Build examples", env['ENABLE_EXAMPLES'], 
                                  why_not_examples)
 
-    conf.find_program('valgrind', var='VALGRIND')
+    try:
+        conf.find_program('valgrind', var='VALGRIND')
+    except WafError:
+        pass
 
     # These flags are used for the implicitly dependent modules.
     if env['ENABLE_STATIC_NS3']: