From 50de0a6d223999a9863136187aad2af7131cd63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Aradi?= Date: Tue, 30 Nov 2021 20:52:38 +0100 Subject: [PATCH] Add some more info about mismatch flags --- lib/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index fd3c892..b5250a0 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -23,11 +23,17 @@ set(sources-fpp fypp_preprocess("${sources-fpp}" sources-f90) -# NAG compiler won't compile these files without the '-mismatch' option +# Some MPI frameworks (e.g. MPICH) do not provide all possible argument +# combinations explicitely in their mpi module. Consequently, compilers +# checking for different signatures for calls of the same subroutine +# may refuse to compile the libray. + +# Allow argument mismatch for the NAG compiler 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 + +# Allow argument mismatch for recent GNU compilers 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)