summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2018-04-26 15:42:03 +0200
committerAdam J. Stewart <ajstewart426@gmail.com>2018-04-26 08:42:03 -0500
commit2ec701d1dd35088e2aa264c55ad6de646d615329 (patch)
treee45bc104811c7a74d862ebc1d6b5af59d4f2117f
parent3b82124d9653f4986dc5d23a1370d32f636d6483 (diff)
downloadspack-2ec701d1dd35088e2aa264c55ad6de646d615329.tar.gz
spack-2ec701d1dd35088e2aa264c55ad6de646d615329.tar.bz2
spack-2ec701d1dd35088e2aa264c55ad6de646d615329.tar.xz
spack-2ec701d1dd35088e2aa264c55ad6de646d615329.zip
adol-c: add boost optional dependency (#7905)
-rw-r--r--var/spack/repos/builtin/packages/adol-c/package.py42
1 files changed, 32 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py
index dd173795dd..2947556f80 100644
--- a/var/spack/repos/builtin/packages/adol-c/package.py
+++ b/var/spack/repos/builtin/packages/adol-c/package.py
@@ -46,6 +46,7 @@ class AdolC(AutotoolsPackage):
variant('openmp', default=False, description='Enable OpenMP support')
variant('sparse', default=False, description='Enable sparse drivers')
variant('examples', default=True, description='Install examples')
+ variant('boost', default=False, description='Enable boost')
# Build dependencies
depends_on('automake', type='build', when='@develop')
@@ -53,6 +54,18 @@ class AdolC(AutotoolsPackage):
depends_on('libtool', type='build', when='@develop')
depends_on('m4', type='build', when='@develop')
+ # Link dependencies
+ depends_on('boost+system', when='+boost')
+
+ # FIXME: add
+ # --with-colpack=DIR path to the colpack library and headers
+ # [default=system libraries]
+ # --with-mpi-root=MPIROOT absolute path to the MPI root directory
+ # --with-mpicc=MPICC name of the MPI C++ compiler (default mpicc)
+ # --with-mpicxx=MPICXX name of the MPI C++ compiler (default mpicxx)
+ # --with-ampi=AMPI_DIR full path to the installation of adjoinable MPI
+ # (AMPI)
+
patch('openmp_exam_261.patch', when='@2.6.1')
def configure_args(self):
@@ -60,25 +73,34 @@ class AdolC(AutotoolsPackage):
configure_args = []
+ if '+boost' in spec:
+ configure_args.append(
+ '--with-boost={0}'.format(spec['boost'].prefix)
+ )
+ else:
+ configure_args.append(
+ '--with-boost=no'
+ )
+
if '+advanced_branching' in spec:
- configure_args.extend([
+ configure_args.append(
'--enable-advanced-branching'
- ])
+ )
if '+atrig_erf' in spec:
- configure_args.extend([
+ configure_args.append(
'--enable-atrig-erf'
- ])
+ )
if '+openmp' in spec:
- configure_args.extend([
+ configure_args.append(
'--with-openmp-flag={0}'.format(self.compiler.openmp_flag)
- ])
+ )
if '+sparse' in spec:
- configure_args.extend([
+ configure_args.append(
'--enable-sparse'
- ])
+ )
# We can simply use the bundled examples to check
# whether Adol-C works as expected
@@ -88,9 +110,9 @@ class AdolC(AutotoolsPackage):
'--enable-addexa' # Additional examples
])
if '+openmp' in spec:
- configure_args.extend([
+ configure_args.append(
'--enable-parexa' # Parallel examples
- ])
+ )
return configure_args