From: Hong, Yang A Date: Tue, 5 Jul 2022 17:11:18 +0000 (+0000) Subject: gcc-10(and above): fix compile issue caused by stringop-overflow X-Git-Tag: vectorscan/5.4.10~1^2~2^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=762f4050a0f6897b7b7f4337eb4354dd4fd9ed85;p=thirdparty%2Fvectorscan.git gcc-10(and above): fix compile issue caused by stringop-overflow --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 43ce320b..e08ae48d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -504,9 +504,9 @@ CHECK_CXX_COMPILER_FLAG("-Wunused-local-typedefs" CXX_UNUSED_LOCAL_TYPEDEFS) CHECK_CXX_COMPILER_FLAG("-Wunused-variable" CXX_WUNUSED_VARIABLE) # gcc 10 complains about this -CHECK_C_COMPILER_FLAG("-Wstringop-overflow" CC_STRINGOP_OVERFLOW) -if(CC_STRINGOP_OVERFLOW) +if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10) set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-stringop-overflow") + set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Wno-stringop-overflow") endif() include_directories(SYSTEM ${Boost_INCLUDE_DIRS})