nalu-wind: add variant to build wind-utils (#20587)
This commit is contained in:
parent
5964cb49d9
commit
717b653bdd
@ -38,6 +38,9 @@ class NaluWind(CMakePackage):
|
|||||||
variant('fftw', default=False,
|
variant('fftw', default=False,
|
||||||
description='Compile with FFTW support')
|
description='Compile with FFTW support')
|
||||||
|
|
||||||
|
variant('wind-utils', default=False,
|
||||||
|
description='Build wind-utils')
|
||||||
|
|
||||||
# Required dependencies
|
# Required dependencies
|
||||||
depends_on('mpi')
|
depends_on('mpi')
|
||||||
depends_on('yaml-cpp@0.5.3:', when='+shared')
|
depends_on('yaml-cpp@0.5.3:', when='+shared')
|
||||||
@ -116,6 +119,11 @@ def cmake_args(self):
|
|||||||
else:
|
else:
|
||||||
options.append('-DENABLE_FFTW:BOOL=OFF')
|
options.append('-DENABLE_FFTW:BOOL=OFF')
|
||||||
|
|
||||||
|
if '+wind-utils' in spec:
|
||||||
|
options.append('-DENABLE_WIND_UTILS=ON')
|
||||||
|
else:
|
||||||
|
options.append('-DENABLE_WIND_UTILS=OFF')
|
||||||
|
|
||||||
if 'darwin' in spec.architecture:
|
if 'darwin' in spec.architecture:
|
||||||
options.append('-DCMAKE_MACOSX_RPATH:BOOL=ON')
|
options.append('-DCMAKE_MACOSX_RPATH:BOOL=ON')
|
||||||
|
|
||||||
@ -139,6 +147,6 @@ def cmake_args(self):
|
|||||||
|
|
||||||
@run_before('cmake')
|
@run_before('cmake')
|
||||||
def add_submodules(self):
|
def add_submodules(self):
|
||||||
if self.run_tests:
|
if self.run_tests or '+wind-utils' in self.spec:
|
||||||
git = which('git')
|
git = which('git')
|
||||||
git('submodule', 'update', '--init', '--recursive')
|
git('submodule', 'update', '--init', '--recursive')
|
||||||
|
Loading…
Reference in New Issue
Block a user