parallelio: make shared lib the default (#32432)
This commit is contained in:
		
							
								
								
									
										23
									
								
								var/spack/repos/builtin/packages/parallelio/gfortran.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								var/spack/repos/builtin/packages/parallelio/gfortran.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | |||||||
|  | --- old/CMakeLists.txt | ||||||
|  | +++ new/CMakeLists.txt | ||||||
|  | @@ -4,7 +4,7 @@ | ||||||
|  |   | ||||||
|  |  # Jim Edwards | ||||||
|  |   | ||||||
|  | -cmake_minimum_required (VERSION 3.5.2) | ||||||
|  | +cmake_minimum_required (VERSION 3.7) | ||||||
|  |  project (PIO C) | ||||||
|  |   | ||||||
|  |  # The project version number. | ||||||
|  | @@ -243,6 +243,11 @@ if (PIO_ENABLE_COVERAGE) | ||||||
|  |    endif () | ||||||
|  |  endif () | ||||||
|  |   | ||||||
|  | +# Allow argument mismatch in gfortran versions > 10 for mpi library compatibility | ||||||
|  | +if ("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_GREATER_EQUAL 10) | ||||||
|  | +   set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") | ||||||
|  | +endif() | ||||||
|  | + | ||||||
|  |  # Include this so we can check values in netcdf_meta.h. | ||||||
|  |  INCLUDE(CheckCSourceCompiles) | ||||||
|  |  INCLUDE(FindNetCDF) | ||||||
| @@ -13,6 +13,7 @@ class Parallelio(CMakePackage): | |||||||
| 
 | 
 | ||||||
|     homepage = "https://ncar.github.io/ParallelIO/" |     homepage = "https://ncar.github.io/ParallelIO/" | ||||||
|     url = "https://github.com/NCAR/ParallelIO/archive/pio2_5_8.tar.gz" |     url = "https://github.com/NCAR/ParallelIO/archive/pio2_5_8.tar.gz" | ||||||
|  |     git = "https://github.com/NCAR/ParallelIO.git" | ||||||
| 
 | 
 | ||||||
|     maintainers = ["jedwards4b"] |     maintainers = ["jedwards4b"] | ||||||
| 
 | 
 | ||||||
| @@ -33,6 +34,9 @@ class Parallelio(CMakePackage): | |||||||
|     depends_on("netcdf-fortran", type="link", when="+fortran") |     depends_on("netcdf-fortran", type="link", when="+fortran") | ||||||
|     depends_on("parallel-netcdf", type="link", when="+pnetcdf") |     depends_on("parallel-netcdf", type="link", when="+pnetcdf") | ||||||
| 
 | 
 | ||||||
|  |     # Allow argument mismatch in gfortran versions > 10 for mpi library compatibility | ||||||
|  |     patch("gfortran.patch", when="+fortran %gcc@10:") | ||||||
|  | 
 | ||||||
|     resource(name="genf90", git="https://github.com/PARALLELIO/genf90.git", tag="genf90_200608") |     resource(name="genf90", git="https://github.com/PARALLELIO/genf90.git", tag="genf90_200608") | ||||||
| 
 | 
 | ||||||
|     def cmake_args(self): |     def cmake_args(self): | ||||||
| @@ -46,6 +50,8 @@ def cmake_args(self): | |||||||
|             define("NetCDF_C_PATH", spec["netcdf-c"].prefix), |             define("NetCDF_C_PATH", spec["netcdf-c"].prefix), | ||||||
|             define("USER_CMAKE_MODULE_PATH", join_path(src, "cmake")), |             define("USER_CMAKE_MODULE_PATH", join_path(src, "cmake")), | ||||||
|             define("GENF90_PATH", join_path(src, "genf90")), |             define("GENF90_PATH", join_path(src, "genf90")), | ||||||
|  |             define("BUILD_SHARED_LIBS", True), | ||||||
|  |             define("PIO_ENABLE_EXAMPLES", False), | ||||||
|         ] |         ] | ||||||
|         if spec.satisfies("+pnetcdf"): |         if spec.satisfies("+pnetcdf"): | ||||||
|             args.extend( |             args.extend( | ||||||
| @@ -68,3 +74,8 @@ def cmake_args(self): | |||||||
|             ] |             ] | ||||||
|         ) |         ) | ||||||
|         return args |         return args | ||||||
|  | 
 | ||||||
|  |     def url_for_version(self, version): | ||||||
|  |         return "https://github.com/NCAR/ParallelIO/archive/pio{0}.tar.gz".format( | ||||||
|  |             version.underscored | ||||||
|  |         ) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jim Edwards
					Jim Edwards