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.
This commit is contained in:
parent
bdfcf7c92b
commit
eb7bc7fc4b
@ -276,11 +276,6 @@ def hostconfig(self, spec, prefix):
|
||||
#######################
|
||||
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 @@ def hostconfig(self, spec, prefix):
|
||||
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
|
||||
|
@ -295,13 +295,7 @@ def hostconfig(self, spec, prefix):
|
||||
#######################
|
||||
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 @@ def hostconfig(self, spec, prefix):
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user