[cig-commits] commit: Making debug option an on/off choice.

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


changeset:   214:6740a624fb43
parent:      211:149582b913b6
user:        JulianGiordani
date:        Tue Dec 22 16:47:55 2009 +1100
files:       SConfigure
description:
Making debug option an on/off choice.
The flag is now called 'with-debug' and its use:
   ./configure.py with-debug=1 ... turns debugging on
   ./configure.py with-debug=0 ... turns debugging off hence the build is optimised


diff -r 149582b913b6 -r 6740a624fb43 SConfigure
--- a/SConfigure	Tue Dec 22 15:22:19 2009 +1100
+++ b/SConfigure	Tue Dec 22 16:47:55 2009 +1100
@@ -8,7 +8,7 @@ options = [
 options = [
     ('--prefix', 'prefix', 'Installation prefix.', None),
     ('--build-dir', 'build_dir', 'Sandbox location.', 'build'),
-    ('--build-type', 'build_type', 'Build type (debug or optimised)', 'debug'),
+    ('--with-debug', 'with_debug', 'Build with debugging', 0, 'int'),
     ('--lib-type', 'lib_type', 'Library type (shared or static)', 'shared'),
     ('--cc', 'CC', 'C compiler', None),
     ('--cflags', 'CFLAGS', 'Flags for the C compiler', None),
@@ -79,7 +79,7 @@ if not (GetOption('help') or GetOption('
     if env.get('with_cautious_mode', None):
         env.MergeFlags('-DCAUTIOUS')
 
-    if env.get('build_type', None) == 'debug':
+    if env.get('with_debug', None):
         env.MergeFlags('-g -DDEBUG')
     else:
         env.MergeFlags('-O3 -DNDEBUG')



More information about the CIG-COMMITS mailing list