diff --git a/CMakeLists.txt b/CMakeLists.txt
index d2d96d07c7611320c5bfbc44bb4d883aa4c2ca98..eb88db91c7cc4d29d8f10476444293e57e9bea2b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -402,9 +402,11 @@ if(USE_FORTRAN)
   # Set module files directory (i.e. where .mod will be created)
   set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/Modules)
   #  Add compilation flags:
-  #append_Fortran_FLAGS("-Wall -fPIC -ffree-line-length-none -DBLOCKING_SEND_PLUS -DBLOCKING_SEND")
-  append_Fortran_FLAGS("-Wall -fPIC -ffree-line-length-none -cpp -fallow-argument-mismatch")
+  append_Fortran_FLAGS("-Wall -fPIC -ffree-line-length-none -cpp")
   append_Fortran_FLAGS("-Wno-unused-dummy-argument -Wno-integer-division -Wno-unused-value -Wno-maybe-uninitialized -Wno-unused-function")
+  if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU" AND CMAKE_Fortran_COMPILER_VERSION GREATER_EQUAL 10.0)
+    append_Fortran_FLAGS("-fallow-argument-mismatch")
+  endif()
 
   if(USE_MPI)
     # -I