Add pic variants to tioga, openfast, nalu-wind, and nalu. (#9560)
This commit is contained in:
parent
8767167c79
commit
a0fb2838ea
@ -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 @@ def cmake_args(self):
|
||||
'-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:
|
||||
|
@ -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 @@ def cmake_args(self):
|
||||
|
||||
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:
|
||||
|
@ -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 @@ def cmake_args(self):
|
||||
'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:
|
||||
|
@ -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 @@ def cmake_args(self):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user