diff options
author | William R Tobin <4522899+wrtobin@users.noreply.github.com> | 2022-10-12 15:28:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-12 15:28:35 -0700 |
commit | 40c400441a75d80f6a901554aeebb5f1100ea3c5 (patch) | |
tree | 30aecf17017f7db4a0bcd9037dbf58b5cd09946a | |
parent | a2dee76310ebd04bfe9cdfdbdeb2eda4a77dc1b9 (diff) | |
download | spack-40c400441a75d80f6a901554aeebb5f1100ea3c5.tar.gz spack-40c400441a75d80f6a901554aeebb5f1100ea3c5.tar.bz2 spack-40c400441a75d80f6a901554aeebb5f1100ea3c5.tar.xz spack-40c400441a75d80f6a901554aeebb5f1100ea3c5.zip |
exodusii: add fortran variant (#33074)
* add fortran variant, pass cmake options to build with fortran + specified compiler/mpi compiler wrapper (following existing style in the package), activate exodus fortran wrapper library compilation
* change variant description, fix style
-rw-r--r-- | var/spack/repos/builtin/packages/exodusii/package.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/exodusii/package.py b/var/spack/repos/builtin/packages/exodusii/package.py index c9cd90eedc..72963398d9 100644 --- a/var/spack/repos/builtin/packages/exodusii/package.py +++ b/var/spack/repos/builtin/packages/exodusii/package.py @@ -56,6 +56,7 @@ class Exodusii(CMakePackage): version("master", branch="master") variant("mpi", default=True, description="Enables MPI parallelism.") + variant("fortran", default=False, description="Build Fortran wrapper libraries.") depends_on("cmake@2.8.11:", type="build") depends_on("mpi", when="+mpi") @@ -88,6 +89,16 @@ class Exodusii(CMakePackage): "-DCMAKE_C_COMPILER={0}".format(cc_path), "-DCMAKE_CXX_COMPILER={0}".format(cxx_path), ] + if "+fortran" in spec: + fc_path = spec["mpi"].mpifc if "+mpi" in spec else self.compiler.f90 + options.extend( + [ + "-DSEACASProj_ENABLE_Fortran:BOOL=ON", + "-DCMAKE_Fortran_COMPILER={0}".format(fc_path), + "-DSEACASProj_ENABLE_SEACASExodus_for:BOOL=ON", + "-DSEACASProj_ENABLE_SEACASExoIIv2for32:BOOL=ON", + ] + ) # Python # # Handle v2016 separately because of older tribits if spec.satisfies("@:2016-08-09"): |