From e60bbd1bfc8c655090edb9935033221fce79cc5d Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Mon, 2 Oct 2023 01:03:47 -0600 Subject: Cgns fix no fortran config (#40241) * SEACAS: Update package.py to handle new SEACAS project name The base project name for the SEACAS project has changed from "SEACASProj" to "SEACAS" as of @2022-10-14, so the package needed to be updated to use the new project name when needed. The refactor also changes several: "-DSome_CMAKE_Option:BOOL=ON" to define("Some_CMAKE_Option", True) * CGNS: If fortran not enabled, do not specify parallel fortran compiler * Update package formatting as suggested by black * Accept suggested change --- var/spack/repos/builtin/packages/cgns/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cgns/package.py b/var/spack/repos/builtin/packages/cgns/package.py index 795af5b568..563dffd287 100644 --- a/var/spack/repos/builtin/packages/cgns/package.py +++ b/var/spack/repos/builtin/packages/cgns/package.py @@ -87,6 +87,7 @@ class Cgns(CMakePackage): self.define_from_variant("CGNS_ENABLE_LEGACY", "legacy"), self.define_from_variant("CGNS_ENABLE_MEM_DEBUG", "mem_debug"), self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), + self.define_from_variant("CGNS_ENABLE_64BIT", "int64"), ] ) @@ -95,11 +96,10 @@ class Cgns(CMakePackage): [ "-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc, "-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx, - "-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc, ] ) - - options.append(self.define_from_variant("CGNS_ENABLE_64BIT", "int64")) + if "+fortran" in spec: + options.append(self.define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc)) if "+hdf5" in spec: options.extend( -- cgit v1.2.3-60-g2f50