From 8287203c928bf3ff8abbed3a2516faa668935978 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 27 Nov 2023 07:02:53 -0700 Subject: [PATCH] fix: append instead of replace extra flags for gnu 10+ with mpich (#1418) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()