diff --git a/CMakeLists.txt b/CMakeLists.txt index 89c7eb329..32af812dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -349,7 +349,7 @@ foreach(kind ${kinds}) if ( CMAKE_Fortran_COMPILER_VERSION MATCHES "1[0-9]\.[0-9]*\.[0-9]*" AND CMAKE_Fortran_COMPILER_ID MATCHES "GNU") if(MPI_C_COMPILER MATCHES ".*mpich.*" ) message(STATUS "Adding -fallow-argument-mismatch flag to compile with GCC >=10 and MPICH") - set_target_properties(${libTgt}_f PROPERTIES COMPILE_FLAGS "-fallow-argument-mismatch -w") + target_compile_options(${libTgt}_f PRIVATE "-fallow-argument-mismatch;-w") endif() endif()