diff options
author | Kelly (KT) Thompson <kgt@lanl.gov> | 2016-06-12 19:48:45 -0600 |
---|---|---|
committer | Kelly (KT) Thompson <kgt@lanl.gov> | 2016-06-12 19:48:45 -0600 |
commit | b89bcdff62e10223a737c0ac26feb996c8202941 (patch) | |
tree | 0f98c35a4d8056b30abb5799cb8d7efad437ade2 /var | |
parent | bc038eb7c36bbc24133311c167d4457b39de4a8a (diff) | |
download | spack-b89bcdff62e10223a737c0ac26feb996c8202941.tar.gz spack-b89bcdff62e10223a737c0ac26feb996c8202941.tar.bz2 spack-b89bcdff62e10223a737c0ac26feb996c8202941.tar.xz spack-b89bcdff62e10223a737c0ac26feb996c8202941.zip |
Make Boost an optional feature of Trilinos.
I have been unable to build Boost with some toolset/platform combinations. The
users I support don't need the Boost features in Trilinos, so I have been
manually hacking trilinos/package.py to disable boost. I would like to propose
that these changes be added to the released version.
+ Add boost as a variant, default to true so there is no change to existing
behavior.
+ Move the CMake configure options related to Boost into a conditional block
that is triggered by "if '+boost' in spec".
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/trilinos/package.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 1eaec86405..28c0bea7c6 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -58,11 +58,12 @@ class Trilinos(Package): variant('python', default=False, description='Build python wrappers') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds a debug version of the libraries') + variant('boost', default=True, description='Compile with Boost') # Everything should be compiled with -fpic depends_on('blas') depends_on('lapack') - depends_on('boost') + depends_on('boost', when='+boost') depends_on('matio') depends_on('glm') depends_on('swig') @@ -121,9 +122,6 @@ class Trilinos(Package): '-DTPL_ENABLE_LAPACK=ON', '-DLAPACK_LIBRARY_NAMES=lapack', '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix, - '-DTPL_ENABLE_Boost:BOOL=ON', - '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, - '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTPL_ENABLE_Netcdf:BOOL=ON', @@ -131,6 +129,14 @@ class Trilinos(Package): '-DTPL_ENABLE_HDF5:BOOL=%s' % ('ON' if '+hdf5' in spec else 'OFF'), ]) + if '+boost' in spec: + options.extend([ + '-DTPL_ENABLE_Boost:BOOL=ON', + '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, + '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib + ]) + else: + options.extend(['-DTPL_ENABLE_Boost:BOOL=OFF']) # Fortran lib libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) options.extend([ |