16 lines
597 B
Diff
16 lines
597 B
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 76619dc..7603a72 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -139,6 +139,10 @@ elseif(CMAKE_COMPILER_IS_GNUCXX)
|
|
set(CMAKE_CXX_FLAGS
|
|
"${CMAKE_CXX_FLAGS} -faligned-new")
|
|
endif()
|
|
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.0)
|
|
+ # disable stringop-overread for gcc >= 11.0
|
|
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-stringop-overread")
|
|
+ endif()
|
|
set(CMAKE_CXX_FLAGS
|
|
"${CMAKE_CXX_FLAGS} -Wunused-result -Werror=unused-result -Wunused-parameter -Werror=unused-parameter")
|
|
endif()
|