[cig-commits] commit: Need to be able to search for packages with
Mercurial
hg at geodynamics.org
Mon Nov 24 11:30:48 PST 2008
changeset: 72:9331baf264f1
user: LukeHodkinson
date: Tue Mar 04 01:28:43 2008 +0000
files: config/SConfig/Package.py config/SConfig/packages/MPI.py config/SConfig/packages/PETSc.py config/SConfig/packages/libXML2.py
description:
Need to be able to search for packages with
an optional extension to the include path,
i.e. /usr/include/libxml
diff -r 0db08eeb238a -r 9331baf264f1 config/SConfig/Package.py
--- a/config/SConfig/Package.py Mon Mar 03 06:35:45 2008 +0000
+++ b/config/SConfig/Package.py Tue Mar 04 01:28:43 2008 +0000
@@ -28,6 +28,7 @@ class Package(object):
self.base_dirs = [] #['']
self.base_patterns = [] #['']
self.sub_dirs = [] #[[[''], ['']]]
+ self.header_sub_dir = ''
# Header options.
self.headers = [] #['']
@@ -85,7 +86,12 @@ class Package(object):
if self.system in ['Darwin', 'Linux']:
self.base_dirs = ['/usr', '/usr/local']
self.sub_dirs = [[['include'], ['lib']]]
+ if self.header_sub_dir:
+ self.sub_dirs += [[[os.path.join('include', self.header_sub_dir)], ['lib']]]
if self.bits == 64:
+ if self.header_sub_dir:
+ self.sub_dirs = [[[os.path.join('include', self.header_sub_dir)],
+ ['lib64']]] + self.sub_dirs
self.sub_dirs = [[['include'], ['lib64']]] + self.sub_dirs
# Set Darwin specific defaults.
diff -r 0db08eeb238a -r 9331baf264f1 config/SConfig/packages/MPI.py
--- a/config/SConfig/packages/MPI.py Mon Mar 03 06:35:45 2008 +0000
+++ b/config/SConfig/packages/MPI.py Tue Mar 04 01:28:43 2008 +0000
@@ -7,7 +7,7 @@ class MPI(SConfig.Package):
self.setup_search_defaults()
self.setup_options()
self.base_patterns = ['mpich*', 'MPICH*']
- self.sub_dirs += [[[os.path.join('include', 'mpi')], ['lib']]]
+ self.header_sub_dir = 'mpi'
self.headers = ['mpi.h']
self.libraries = [['mpich'],
['mpich', 'pmpich'],
diff -r 0db08eeb238a -r 9331baf264f1 config/SConfig/packages/PETSc.py
--- a/config/SConfig/packages/PETSc.py Mon Mar 03 06:35:45 2008 +0000
+++ b/config/SConfig/packages/PETSc.py Tue Mar 04 01:28:43 2008 +0000
@@ -8,7 +8,7 @@ class PETSc(SConfig.Package):
self.setup_options()
self.dependencies = [SConfig.packages.MPI]
self.base_patterns = ['petsc*', 'PETSC*', 'PETSc*']
- self.sub_dirs += [[[os.path.join('include', 'petsc')], ['lib']]]
+ self.header_sub_dir = 'petsc'
self.headers = ['petsc.h',
'petscvec.h', 'petscmat.h',
'petscksp.h', 'petscsnes.h']
diff -r 0db08eeb238a -r 9331baf264f1 config/SConfig/packages/libXML2.py
--- a/config/SConfig/packages/libXML2.py Mon Mar 03 06:35:45 2008 +0000
+++ b/config/SConfig/packages/libXML2.py Tue Mar 04 01:28:43 2008 +0000
@@ -4,8 +4,8 @@ class libXML2(SConfig.Package):
class libXML2(SConfig.Package):
def __init__(self, env, options):
SConfig.Package.__init__(self, env, options)
+ self.header_sub_dir = 'libxml2'
self.setup_search_defaults()
self.setup_options()
- self.sub_dirs += [[[os.path.join('include', 'libxml2')], ['lib']]]
self.headers = [os.path.join('libxml', 'parser.h')]
self.libraries = [['xml2']]
More information about the CIG-COMMITS
mailing list