summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwryankrattiger <80296582+kwryankrattiger@users.noreply.github.com>2022-02-01 08:44:48 -0600
committerGitHub <noreply@github.com>2022-02-01 07:44:48 -0700
commiteb7bc7fc4b0dbd11a41ebbe1307da7089217826a (patch)
treefceb6c03abd3cf9802b2ede250ec61c6a86d8512
parentbdfcf7c92bc7cf69999e3fbe4b340be0d546b04a (diff)
downloadspack-eb7bc7fc4b0dbd11a41ebbe1307da7089217826a.tar.gz
spack-eb7bc7fc4b0dbd11a41ebbe1307da7089217826a.tar.bz2
spack-eb7bc7fc4b0dbd11a41ebbe1307da7089217826a.tar.xz
spack-eb7bc7fc4b0dbd11a41ebbe1307da7089217826a.zip
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.
-rw-r--r--var/spack/repos/builtin/packages/ascent/package.py10
-rw-r--r--var/spack/repos/builtin/packages/conduit/package.py13
2 files changed, 3 insertions, 20 deletions
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: