diff options
author | twang15 <twang15@ncsu.edu> | 2018-06-18 11:52:24 -0700 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2018-06-18 13:52:24 -0500 |
commit | ec1b2d0a3a0ffed93825e90f927db542149d3bda (patch) | |
tree | 876472e84a94c3ef09ae066c1a0cc155b7950e2b | |
parent | d98d45ec500c2850a507ddd248abff62a9253add (diff) | |
download | spack-ec1b2d0a3a0ffed93825e90f927db542149d3bda.tar.gz spack-ec1b2d0a3a0ffed93825e90f927db542149d3bda.tar.bz2 spack-ec1b2d0a3a0ffed93825e90f927db542149d3bda.tar.xz spack-ec1b2d0a3a0ffed93825e90f927db542149d3bda.zip |
samrai: update package for 3.12.0 and fix compilation bugs for earlier versions (#8501)
* SAMRAI: remove dependency on boost for samrai 3.12.0 or later versions, but keep the older versions ccontinuing working with boost 1.64.0 or earlier. Also, the older versions cannot compile with boost 1.65.0 or above. (#8491)
* SAMRAI: fix typos of comments and remove obsolete code.
-rw-r--r-- | var/spack/repos/builtin/packages/samrai/package.py | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/samrai/package.py b/var/spack/repos/builtin/packages/samrai/package.py index 9caf76c888..f1c8f78332 100644 --- a/var/spack/repos/builtin/packages/samrai/package.py +++ b/var/spack/repos/builtin/packages/samrai/package.py @@ -66,11 +66,10 @@ class Samrai(AutotoolsPackage): depends_on('hdf5+mpi') depends_on('m4', type='build') - # At some point later versions of boost were not able to be found - # by SAMRAI during configure, so we're using boost <= 1.60.0 for - # < 3.12.0 versions. I don't know what version of boost that - # happened at though without trying each version of boost. - depends_on('boost@:1.60.0', when='@0:3.11.99') + # Starting with 3.12.0, samrai no longer depends on boost. + # version 3.11.5 or earlier can only work with boost version + # 1.64.0 or earlier. + depends_on('boost@:1.64.0', when='@0:3.11.99', type='build') # don't build tools with gcc patch('no-tool-build.patch', when='%gcc') @@ -90,11 +89,6 @@ class Samrai(AutotoolsPackage): '--with-hypre=no', '--with-petsc=no']) - if self.spec.satisfies('@0:3.11.99'): - options.extend([ - '--with-boost=%s' % self.spec['boost'].prefix - ]) - if '+debug' in self.spec: options.extend([ '--disable-opt', @@ -104,4 +98,16 @@ class Samrai(AutotoolsPackage): '--enable-opt', '--disable-debug']) + if self.version >= Version('3.12.0'): + # only version 3.12.0 and above, samrai does not use + # boost, but needs c++11. Without c++11 flags, samrai + # cannot build with either gcc or intel compilers. + if 'CXXFLAGS' in env and env['CXXFLAGS']: + env['CXXFLAGS'] += ' ' + self.compiler.cxx11_flag + else: + env['CXXFLAGS'] = self.compiler.cxx11_flag + else: + # boost 1.64.0 or earlier works with samrai 2.4.4~3.11.5 + options.append('--with-boost=%s' % self.spec['boost'].prefix) + return options |