Skip to content

Commit 8431e7b

Browse files
LKedwardawvwgk
authored andcommitted
Add: possible fix for gcc-11.
Remove -pedantic-errors flag for gcc-11.
1 parent 35f18f3 commit 8431e7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
2424
add_compile_options(-Wconversion-extra)
2525
# -pedantic-errors triggers a false positive for optional arguments of elemental functions,
2626
# see test_optval and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95446
27-
add_compile_options(-pedantic-errors)
27+
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 11.0)
28+
add_compile_options(-pedantic-errors)
29+
endif()
2830
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
2931
add_compile_options(-std=f2018)
3032
else()

0 commit comments

Comments
 (0)