exodusii: add fortran variant (#33074)
* add fortran variant, pass cmake options to build with fortran + specified compiler/mpi compiler wrapper (following existing style in the package), activate exodus fortran wrapper library compilation * change variant description, fix style
This commit is contained in:
		| @@ -56,6 +56,7 @@ class Exodusii(CMakePackage): | |||||||
|     version("master", branch="master") |     version("master", branch="master") | ||||||
| 
 | 
 | ||||||
|     variant("mpi", default=True, description="Enables MPI parallelism.") |     variant("mpi", default=True, description="Enables MPI parallelism.") | ||||||
|  |     variant("fortran", default=False, description="Build Fortran wrapper libraries.") | ||||||
| 
 | 
 | ||||||
|     depends_on("cmake@2.8.11:", type="build") |     depends_on("cmake@2.8.11:", type="build") | ||||||
|     depends_on("mpi", when="+mpi") |     depends_on("mpi", when="+mpi") | ||||||
| @@ -88,6 +89,16 @@ def cmake_args(self): | |||||||
|             "-DCMAKE_C_COMPILER={0}".format(cc_path), |             "-DCMAKE_C_COMPILER={0}".format(cc_path), | ||||||
|             "-DCMAKE_CXX_COMPILER={0}".format(cxx_path), |             "-DCMAKE_CXX_COMPILER={0}".format(cxx_path), | ||||||
|         ] |         ] | ||||||
|  |         if "+fortran" in spec: | ||||||
|  |             fc_path = spec["mpi"].mpifc if "+mpi" in spec else self.compiler.f90 | ||||||
|  |             options.extend( | ||||||
|  |                 [ | ||||||
|  |                     "-DSEACASProj_ENABLE_Fortran:BOOL=ON", | ||||||
|  |                     "-DCMAKE_Fortran_COMPILER={0}".format(fc_path), | ||||||
|  |                     "-DSEACASProj_ENABLE_SEACASExodus_for:BOOL=ON", | ||||||
|  |                     "-DSEACASProj_ENABLE_SEACASExoIIv2for32:BOOL=ON", | ||||||
|  |                 ] | ||||||
|  |             ) | ||||||
|         # Python # |         # Python # | ||||||
|         # Handle v2016 separately because of older tribits |         # Handle v2016 separately because of older tribits | ||||||
|         if spec.satisfies("@:2016-08-09"): |         if spec.satisfies("@:2016-08-09"): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 William R Tobin
					William R Tobin