From b0b206757500eb538afe888c9abac4f784f36459 Mon Sep 17 00:00:00 2001 From: Alessandro Pecchia Date: Tue, 30 Nov 2021 10:15:24 +0100 Subject: [PATCH] Add -fallow-argument-mismatch for GNU 11 --- lib/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 8fd9245..fd3c892 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -27,6 +27,12 @@ fypp_preprocess("${sources-fpp}" sources-f90) if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "NAG") set_source_files_properties(SOURCE ${sources-f90} PROPERTY COMPILE_FLAGS -mismatch) endif() +# GNU 11 compiler won't compile these files without the '-fallow-argument-mismatch' option +if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU") + if("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_GREATER_EQUAL "11") + set_source_files_properties(SOURCE ${sources-f90} PROPERTY COMPILE_FLAGS -fallow-argument-mismatch) + endif() +endif() add_library(mpifx ${sources-f90})