summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Rood <jon.rood@nrel.gov>2018-10-24 06:39:12 -0600
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2018-10-24 14:39:12 +0200
commita0fb2838ea60f020179f480a2db1438da9d2e2ab (patch)
tree31cfdc10b2e675fdb981ac4ce371492ee582be16
parent8767167c79b506af4f72e13b6dfdf49f0fb178b4 (diff)
downloadspack-a0fb2838ea60f020179f480a2db1438da9d2e2ab.tar.gz
spack-a0fb2838ea60f020179f480a2db1438da9d2e2ab.tar.bz2
spack-a0fb2838ea60f020179f480a2db1438da9d2e2ab.tar.xz
spack-a0fb2838ea60f020179f480a2db1438da9d2e2ab.zip
Add pic variants to tioga, openfast, nalu-wind, and nalu. (#9560)
-rw-r--r--var/spack/repos/builtin/packages/nalu-wind/package.py6
-rw-r--r--var/spack/repos/builtin/packages/nalu/package.py6
-rw-r--r--var/spack/repos/builtin/packages/openfast/package.py6
-rw-r--r--var/spack/repos/builtin/packages/tioga/package.py6
4 files changed, 20 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/nalu-wind/package.py b/var/spack/repos/builtin/packages/nalu-wind/package.py
index 6a8f4d78de..0b3414ad85 100644
--- a/var/spack/repos/builtin/packages/nalu-wind/package.py
+++ b/var/spack/repos/builtin/packages/nalu-wind/package.py
@@ -27,6 +27,8 @@ class NaluWind(CMakePackage):
description='Compile with Hypre support')
variant('shared', default=(sys.platform != 'darwin'),
description='Build Trilinos as shared library')
+ variant('pic', default=True,
+ description='Position independent code')
depends_on('mpi')
depends_on('yaml-cpp@0.5.3:')
@@ -50,7 +52,9 @@ class NaluWind(CMakePackage):
'-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc,
'-DMPI_C_COMPILER=%s' % spec['mpi'].mpicc,
'-DMPI_CXX_COMPILER=%s' % spec['mpi'].mpicxx,
- '-DMPI_Fortran_COMPILER=%s' % spec['mpi'].mpifc
+ '-DMPI_Fortran_COMPILER=%s' % spec['mpi'].mpifc,
+ '-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=%s' % (
+ 'ON' if '+pic' in spec else 'OFF'),
])
if '+openfast' in spec:
diff --git a/var/spack/repos/builtin/packages/nalu/package.py b/var/spack/repos/builtin/packages/nalu/package.py
index 225ed2ee66..5e009d7e01 100644
--- a/var/spack/repos/builtin/packages/nalu/package.py
+++ b/var/spack/repos/builtin/packages/nalu/package.py
@@ -26,6 +26,8 @@ class Nalu(CMakePackage):
description='Compile with Hypre support')
variant('shared', default=(sys.platform != 'darwin'),
description='Build Trilinos as shared library')
+ variant('pic', default=True,
+ description='Position independent code')
depends_on('mpi')
depends_on('yaml-cpp@0.5.3:')
@@ -43,7 +45,9 @@ class Nalu(CMakePackage):
options.extend([
'-DTrilinos_DIR:PATH=%s' % spec['trilinos'].prefix,
- '-DYAML_DIR:PATH=%s' % spec['yaml-cpp'].prefix
+ '-DYAML_DIR:PATH=%s' % spec['yaml-cpp'].prefix,
+ '-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=%s' % (
+ 'ON' if '+pic' in spec else 'OFF'),
])
if '+openfast' in spec:
diff --git a/var/spack/repos/builtin/packages/openfast/package.py b/var/spack/repos/builtin/packages/openfast/package.py
index 710b4f3bfc..14824588db 100644
--- a/var/spack/repos/builtin/packages/openfast/package.py
+++ b/var/spack/repos/builtin/packages/openfast/package.py
@@ -17,7 +17,7 @@ class Openfast(CMakePackage):
version('develop', branch='dev')
version('master', branch='master')
- variant('shared', default=False,
+ variant('shared', default=True,
description="Build shared libraries")
variant('double-precision', default=True,
description="Treat REAL as double precision")
@@ -25,6 +25,8 @@ class Openfast(CMakePackage):
description="Enable dynamic library loading interface")
variant('cxx', default=False,
description="Enable C++ bindings")
+ variant('pic', default=True,
+ description="Position independent code")
# Dependencies for OpenFAST Fortran
depends_on('blas')
@@ -54,6 +56,8 @@ class Openfast(CMakePackage):
'ON' if '+dll-interface' in spec else 'OFF'),
'-DBUILD_FAST_CPP_API:BOOL=%s' % (
'ON' if '+cxx' in spec else 'OFF'),
+ '-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=%s' % (
+ 'ON' if '+pic' in spec else 'OFF'),
])
# Make sure we use Spack's blas/lapack:
diff --git a/var/spack/repos/builtin/packages/tioga/package.py b/var/spack/repos/builtin/packages/tioga/package.py
index 8828c6b86e..89ea1923e6 100644
--- a/var/spack/repos/builtin/packages/tioga/package.py
+++ b/var/spack/repos/builtin/packages/tioga/package.py
@@ -15,8 +15,10 @@ class Tioga(CMakePackage):
# The master branch doesn't support CMake
version('develop', branch='nalu-api')
- variant('shared', default=False,
+ variant('shared', default=True,
description="Enable building shared libraries")
+ variant('pic', default=True,
+ description="Position independent code")
depends_on('mpi')
@@ -29,6 +31,8 @@ class Tioga(CMakePackage):
options = [
'-DBUILD_SHARED_LIBS:BOOL=%s' % (
'ON' if '+shared' in spec else 'OFF'),
+ '-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=%s' % (
+ 'ON' if '+pic' in spec else 'OFF'),
'-DMPI_CXX_COMPILER:PATH=%s' % spec['mpi'].mpicxx,
'-DMPI_C_COMPILER:PATH=%s' % spec['mpi'].mpicc,
'-DMPI_Fortran_COMPILER:PATH=%s' % spec['mpi'].mpifc