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:
		| @@ -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", | ||||
|   | ||||
| @@ -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 = "" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Chris White
					Chris White