Skip to content

Commit

Permalink
Add -fallow-argument-mismatch for GNU 11
Browse files Browse the repository at this point in the history
  • Loading branch information
pecchia committed Nov 30, 2021
1 parent 41ef2c3 commit b0b2067
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down

0 comments on commit b0b2067

Please sign in to comment.