From eb7bc7fc4b0dbd11a41ebbe1307da7089217826a Mon Sep 17 00:00:00 2001 From: kwryankrattiger <80296582+kwryankrattiger@users.noreply.github.com> Date: Tue, 1 Feb 2022 08:44:48 -0600 Subject: Ascent/Conduit: Update the +fortran build config (#28646) Do not silently turn off fortran support based on checking if a fortran compiler exists. Let the build fail if there is no working fortran compiler. --- var/spack/repos/builtin/packages/ascent/package.py | 10 +--------- var/spack/repos/builtin/packages/conduit/package.py | 13 ++----------- 2 files changed, 3 insertions(+), 20 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/ascent/package.py b/var/spack/repos/builtin/packages/ascent/package.py index b734eac345..d4784cc1d6 100644 --- a/var/spack/repos/builtin/packages/ascent/package.py +++ b/var/spack/repos/builtin/packages/ascent/package.py @@ -276,11 +276,6 @@ class Ascent(CMakePackage, CudaPackage): ####################### c_compiler = env["SPACK_CC"] cpp_compiler = env["SPACK_CXX"] - f_compiler = None - - if self.compiler.fc: - # even if this is set, it may not exist so do one more sanity check - f_compiler = env["SPACK_FC"] ####################################################################### # Directly fetch the names of the actual compilers to create a @@ -330,12 +325,9 @@ class Ascent(CMakePackage, CudaPackage): cfg.write(cmake_cache_entry("CMAKE_CXX_COMPILER", cpp_compiler)) cfg.write("# fortran compiler used by spack\n") - if "+fortran" in spec and f_compiler is not None: + if "+fortran" in spec: cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "ON")) - cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER", - f_compiler)) else: - cfg.write("# no fortran compiler found\n\n") cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "OFF")) # shared vs static libs diff --git a/var/spack/repos/builtin/packages/conduit/package.py b/var/spack/repos/builtin/packages/conduit/package.py index e3bd8598cd..38110f4d6a 100644 --- a/var/spack/repos/builtin/packages/conduit/package.py +++ b/var/spack/repos/builtin/packages/conduit/package.py @@ -295,13 +295,7 @@ class Conduit(CMakePackage): ####################### c_compiler = env["SPACK_CC"] cpp_compiler = env["SPACK_CXX"] - f_compiler = None - - if self.compiler.fc: - # even if this is set, it may not exist - # do one more sanity check - if os.path.isfile(env["SPACK_FC"]): - f_compiler = env["SPACK_FC"] + f_compiler = env["SPACK_FC"] ####################################################################### # Directly fetch the names of the actual compilers to create a @@ -349,12 +343,9 @@ class Conduit(CMakePackage): cfg.write(cmake_cache_entry("CMAKE_CXX_COMPILER", cpp_compiler)) cfg.write("# fortran compiler used by spack\n") - if "+fortran" in spec and f_compiler is not None: + if "+fortran" in spec: cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "ON")) - cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER", - f_compiler)) else: - cfg.write("# no fortran compiler found\n\n") cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "OFF")) if "+shared" in spec: -- cgit v1.2.3-70-g09d2