[cig-commits] commit: add flag to enable/disable compile time warnings

Mercurial hg at geodynamics.org
Mon Feb 1 15:30:27 PST 2010


changeset:   233:f430825e613d
branch:      1.4.x
parent:      231:4a2d946e79dc
user:        John Mansour <john.mansour at maths.monash.edu.au>
date:        Fri Jan 08 08:29:19 2010 +1100
files:       SConfigure
description:
add flag to enable/disable compile time warnings


diff -r 4a2d946e79dc -r f430825e613d SConfigure
--- a/SConfigure	Wed Jan 06 15:13:19 2010 +1100
+++ b/SConfigure	Fri Jan 08 08:29:19 2010 +1100
@@ -9,6 +9,7 @@ options = [
     ('--prefix', 'prefix', 'Installation prefix.', None),
     ('--build-dir', 'build_dir', 'Sandbox location.', 'build'),
     ('--with-debugging', 'with_debugging', 'Build with debugging', 1, 'int'),
+    ('--with-warnings', 'with_warnings', 'Print all warnings at compile time', 1, 'int'),
     ('--lib-type', 'lib_type', 'Library type (shared or static)', 'shared'),
     ('--cc', 'CC', 'C compiler', None),
     ('--cflags', 'CFLAGS', 'Flags for the C compiler', None),
@@ -165,7 +166,8 @@ if not (GetOption('help') or GetOption('
     env.ConfigurePackage(packages.PETScExt, required=False)
 
     # enable all warnings.
-    env.MergeFlags('-Wall')
+    if env.get('with_warnings', None):    
+	env.MergeFlags('-Wall')
     if env.get('CC', None) == 'icc':
         env.MergeFlags('-wd869 -wd1419')
 



More information about the CIG-COMMITS mailing list