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:
Chris White 2020-06-19 12:31:09 -07:00 committed by GitHub
parent 844312f213
commit a20ba315f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -231,7 +231,9 @@ def hostconfig(self, spec, prefix):
if 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(
os.path.dirname(cpp_compiler)), "lib")
flags = ""
@ -444,7 +446,7 @@ def hostconfig(self, spec, prefix):
# Override XL compiler family
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",
familymsg))
if "xlc" in c_compiler:
@ -455,7 +457,7 @@ def hostconfig(self, spec, prefix):
familymsg))
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 "
"in preprocessed files")
cfg.write(cmake_cache_entry("BLT_FORTRAN_FLAGS",

View File

@ -371,7 +371,9 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
if 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(
os.path.dirname(f_compiler)), "lib")
flags = ""