spack/var/spack/repos/builtin/packages/parallelio/gfortran.patch
2022-09-12 17:48:21 +02:00

24 lines
630 B
Diff

--- 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)