From 40c400441a75d80f6a901554aeebb5f1100ea3c5 Mon Sep 17 00:00:00 2001 From: William R Tobin <4522899+wrtobin@users.noreply.github.com> Date: Wed, 12 Oct 2022 15:28:35 -0700 Subject: 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 --- var/spack/repos/builtin/packages/exodusii/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'var') 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"): -- cgit v1.2.3-70-g09d2