Skip to content

Commit aa5beee

Browse files
committed
silence gcc-15 warnings
1 parent fd565cc commit aa5beee

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU AND CMAKE_Fortran_COMPILER_VERSION VER
3131
message(FATAL_ERROR "GCC Version 9 or newer required")
3232
endif()
3333

34+
# --- silence gfortran-15 argument-mismatch warnings
35+
if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU
36+
AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0
37+
AND CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 16.0)
38+
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:-Wno-external-argument-mismatch>")
39+
endif()
40+
3441
# --- compiler feature checks
3542
include(CheckFortranSourceCompiles)
3643
include(CheckFortranSourceRuns)

0 commit comments

Comments
 (0)