[cig-commits] commit: Using stgUnderworldE's SConfigure/SConstruct.
Mercurial
hg at geodynamics.org
Mon Feb 1 15:29:48 PST 2010
changeset: 194:fc3dd7d515f5
user: JericoRevote
date: Fri Nov 27 14:22:02 2009 +1100
files: SConfigure SConstruct
description:
Using stgUnderworldE's SConfigure/SConstruct.
diff -r 1d0be4083c7d -r fc3dd7d515f5 SConfigure
--- a/SConfigure Fri Nov 27 13:17:01 2009 +1100
+++ b/SConfigure Fri Nov 27 14:22:02 2009 +1100
@@ -1,5 +1,5 @@ import platform, os, sys
import platform, os, sys
-from config import packages, cc
+from config import Package, packages, cc
#
# Add options to be passed on to build.
@@ -13,7 +13,6 @@ options = [
('--cc', 'CC', 'C compiler', None),
('--cflags', 'CFLAGS', 'Flags for the C compiler', None),
('--with-glucifer', 'with_glucifer', 'Enable gLucifer', 1, 'int'),
- ('--with-experimental', 'with_experimental', 'Download Experimental Repository', 0, 'int'),
('--with-osmesa', 'with_osmesa', 'Enable OSMesa output', 1, 'int'),
('--with-sdl', 'with_sdl', 'Enable SDL output', 1, 'int'),
('--with-x11', 'with_x11', 'Enable X11 output', 1, 'int'),
@@ -38,7 +37,7 @@ env.Tool('config', toolpath=['config'],
#
env.UsePackage(packages.libXML2)
-env.UsePackage(packages.PETSc)
+env.UsePackage(packages.PETScExt)
env.UsePackage(packages.HDF5)
env.UsePackage(packages.OSMesa)
env.UsePackage(packages.OpenGL)
@@ -58,6 +57,10 @@ if not (GetOption('help') or GetOption('
if env.get('CC', None) is not None:
cc.apply_cc(env, env['CC'])
+
+ # Switch off auto compilers if we were given one.
+ if '--cc' in ARGUMENTS:
+ env['packages'][packages.MPI].try_compilers = False
if env.get('prefix', None) is None:
env['prefix'] = env.GetLaunchDir()
@@ -83,6 +86,9 @@ if not (GetOption('help') or GetOption('
elif env.get('lib_type', None) == 'static':
env['shared_libs'] = 0
env['static_libs'] = 1
+ #env.MergeFlags('-static')
+ #env.AppendUnique(LINKFLAGS=['-static'])
+ Package.static = True
else:
print 'Invalid option \'--lib-type\''
sys.exit()
@@ -95,9 +101,9 @@ if not (GetOption('help') or GetOption('
# packages.
if env.get('with_glucifer', None):
- # Try for OSMesa first.
+ # Try for OSMesa first on *nix systems.
osm = 0
- if env.get('with_osmesa'):
+ if platform.system() != 'Darwin' and env.get('with_osmesa'):
osm = env.ConfigurePackage(packages.OSMesa, required=False).result
# If not, go for OpenGL.
@@ -147,6 +153,7 @@ if not (GetOption('help') or GetOption('
env.ConfigurePackage(packages.libFAME, required=False)
env.ConfigurePackage(packages.PETSc)
+ env.ConfigurePackage(packages.PETScExt, required=False)
#
# Export the environment.
diff -r 1d0be4083c7d -r fc3dd7d515f5 SConstruct
--- a/SConstruct Fri Nov 27 13:17:01 2009 +1100
+++ b/SConstruct Fri Nov 27 14:22:02 2009 +1100
@@ -1,4 +1,4 @@ import sys, os, subprocess
-import sys, os, subprocess
+import sys, os, subprocess, platform
EnsureSConsVersion(0, 98)
@@ -21,6 +21,10 @@ values = {}
values = {}
execfile("config.cfg", globals(), values)
env._dict.update(values)
+
+# Check if we're using 64bit.
+if platform.architecture()[0] == '64bit':
+ env.AppendUnique(CPPDEFINES=[('SYSTEM_SIZEOF_LONG', 8)])
# Need to manipulate the build directory to keep SCons happy. Because of SCons' target
# rules we need to make the build directory a default target.
@@ -105,17 +109,16 @@ SConscript('Underworld/SConscript',
duplicate=0)
env.Prepend(LIBS=['Underworld'])
+SConscript('Experimental/SConscript',
+ variant_dir=env['build_dir'] + '/Experimental',
+ duplicate=0)
+env.Prepend(LIBS=['Experimental'])
+
if env['with_glucifer']:
SConscript('gLucifer/SConscript',
variant_dir=env['build_dir'] + '/gLucifer',
duplicate=0)
env.Prepend(LIBS=['glucifer'])
-
-if env['with_experimental']:
- SConscript('Experimental/SConscript',
- variant_dir=env['build_dir'] + '/Experimental',
- duplicate=0)
- env.Prepend(LIBS=['experimental'])
#
# Build static version of StGermain.
More information about the CIG-COMMITS
mailing list