Axom/Conduit: Fix error when fortran is not defined (#17171)
* Fix error when fortran is not defined * Guard more ~fortran cases
This commit is contained in:
parent
844312f213
commit
a20ba315f5
@ -231,7 +231,9 @@ def hostconfig(self, spec, prefix):
|
|||||||
if fflags:
|
if fflags:
|
||||||
cfg.write(cmake_cache_entry("CMAKE_Fortran_FLAGS", fflags))
|
cfg.write(cmake_cache_entry("CMAKE_Fortran_FLAGS", fflags))
|
||||||
|
|
||||||
if ("gfortran" in f_compiler) and ("clang" in cpp_compiler):
|
if ((f_compiler is not None)
|
||||||
|
and ("gfortran" in f_compiler)
|
||||||
|
and ("clang" in cpp_compiler)):
|
||||||
libdir = pjoin(os.path.dirname(
|
libdir = pjoin(os.path.dirname(
|
||||||
os.path.dirname(cpp_compiler)), "lib")
|
os.path.dirname(cpp_compiler)), "lib")
|
||||||
flags = ""
|
flags = ""
|
||||||
@ -444,7 +446,7 @@ def hostconfig(self, spec, prefix):
|
|||||||
|
|
||||||
# Override XL compiler family
|
# Override XL compiler family
|
||||||
familymsg = ("Override to proper compiler family for XL")
|
familymsg = ("Override to proper compiler family for XL")
|
||||||
if "xlf" in f_compiler:
|
if (f_compiler is not None) and ("xlf" in f_compiler):
|
||||||
cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER_ID", "XL",
|
cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER_ID", "XL",
|
||||||
familymsg))
|
familymsg))
|
||||||
if "xlc" in c_compiler:
|
if "xlc" in c_compiler:
|
||||||
@ -455,7 +457,7 @@ def hostconfig(self, spec, prefix):
|
|||||||
familymsg))
|
familymsg))
|
||||||
|
|
||||||
if spec.satisfies('target=ppc64le:'):
|
if spec.satisfies('target=ppc64le:'):
|
||||||
if "xlf" in f_compiler:
|
if (f_compiler is not None) and ("xlf" in f_compiler):
|
||||||
description = ("Converts C-style comments to Fortran style "
|
description = ("Converts C-style comments to Fortran style "
|
||||||
"in preprocessed files")
|
"in preprocessed files")
|
||||||
cfg.write(cmake_cache_entry("BLT_FORTRAN_FLAGS",
|
cfg.write(cmake_cache_entry("BLT_FORTRAN_FLAGS",
|
||||||
|
@ -371,7 +371,9 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
|
|||||||
if fflags:
|
if fflags:
|
||||||
cfg.write(cmake_cache_entry("CMAKE_Fortran_FLAGS", fflags))
|
cfg.write(cmake_cache_entry("CMAKE_Fortran_FLAGS", fflags))
|
||||||
|
|
||||||
if ("gfortran" in f_compiler) and ("clang" in cpp_compiler):
|
if ((f_compiler is not None)
|
||||||
|
and ("gfortran" in f_compiler)
|
||||||
|
and ("clang" in cpp_compiler)):
|
||||||
libdir = os.path.join(os.path.dirname(
|
libdir = os.path.join(os.path.dirname(
|
||||||
os.path.dirname(f_compiler)), "lib")
|
os.path.dirname(f_compiler)), "lib")
|
||||||
flags = ""
|
flags = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user