[cig-commits] commit: Updating stgMagma to require HDF5 and Dave May's

Mercurial hg at geodynamics.org
Mon Nov 24 11:22:43 PST 2008


changeset:   22:382f9bbb0274
user:        LukeHodkinson
date:        Mon Feb 11 00:44:34 2008 +0000
files:       SConfigure SConstruct
description:
Updating stgMagma to require HDF5 and Dave May's
PETSc extensions.


diff -r 21ca33d3bd17 -r 382f9bbb0274 SConfigure
--- a/SConfigure	Fri Feb 08 04:28:48 2008 +0000
+++ b/SConfigure	Mon Feb 11 00:44:34 2008 +0000
@@ -141,8 +141,7 @@ if not env.GetOption('clean'):
                                           CheckFortranSymbol})
 
     # Add a member to 'env' for storing package results.
-    if not build_opts:
-        env['PACKAGES'] = {}
+    env['PACKAGES'] = {}
 
     # Print out a message about what architecture we're
     # planning on using.
@@ -254,6 +253,29 @@ if not env.GetOption('clean'):
         petsc.add_options(opts)
 
     #
+    # Check for Mayhem's PETSc extensions.
+    #
+
+    petsc = env.Package('PETScExt', env)
+    petsc.pkg_dirs = ['petscext*', 'PETScExt*', 'PETSCEXT*']
+    state = env['PACKAGES'].get('PETSc', None)
+    if state:
+        petsc.lib_sub_dirs = ['', state.arch]
+    petsc.hdrs = ['petscext.h']
+    petsc.libs = [('petscext_vec', 'petscext_mat',
+                   'petscext_ksp', 'petscext_pc',
+                   'petscext_snes', 'petscext_utils')]
+    petsc.use_rpath = True
+
+    if not build_opts:
+        if not cfg.CheckPackage(petsc):
+            env.Exit()
+        env.Append(CPPDEFINES='HAVE_PETSC')
+        opts.Save('config.cache', env)
+    else:
+        petsc.add_options(opts)
+
+    #
     # Setup OpenGL.
     #
 
@@ -380,8 +402,9 @@ if not env.GetOption('clean'):
     hdf.libs = ['hdf5']
 
     if not build_opts:
-        if cfg.CheckPackage(hdf):
-            env.Append(CPPDEFINES='HAVE_HDF5')
+        if not cfg.CheckPackage(hdf):
+            env.Exit()
+        env.Append(CPPDEFINES='HAVE_HDF5')
         opts.Save('config.cache', env)
     else:
         hdf.add_options(opts)
diff -r 21ca33d3bd17 -r 382f9bbb0274 SConstruct
--- a/SConstruct	Fri Feb 08 04:28:48 2008 +0000
+++ b/SConstruct	Mon Feb 11 00:44:34 2008 +0000
@@ -103,4 +103,8 @@ env.Append(LIBS=['Underworld'])
 env.Append(LIBS=['Underworld'])
 
 env.clear_all()
+SConscript('build/Magma/SConscript', exports='env')
+env.Append(LIBS=['Magma'])
+
+env.clear_all()
 SConscript('build/gLucifer/SConscript', exports='env')



More information about the CIG-COMMITS mailing list