Skip to content

Commit 99fbb4e

Browse files
committed
add -Wno-array-bounds for GCC11
1 parent bcbccc2 commit 99fbb4e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if(nlohmann_json_FOUND)
3737
endif()
3838

3939
if(CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Intel)
40-
add_compile_options(-Werror -Wall -Wextra)
40+
add_compile_options(-Werror -Wall -Wextra $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,12>>:-Wno-array-bounds>)
4141

4242
if(NOT CMAKE_CXX_FLAGS MATCHES "-march")
4343
CHECK_CXX_COMPILER_FLAG(-march=native HAS_MARCH_NATIVE)

0 commit comments

Comments
 (0)