hs-test: point gdb to vpp source files
[vpp.git] / src / CMakeLists.txt
index 2fb0703..b6d48f5 100644 (file)
@@ -55,6 +55,10 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
   if (CMAKE_C_COMPILER_VERSION VERSION_LESS MIN_SUPPORTED_GNU_C_COMPILER_VERSION)
     set(COMPILER_TOO_OLD TRUE)
   endif()
+  set(GCC_STRING_OVERFLOW_WARNING_DISABLE_VERSION 10.0.0)
+  if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL GCC_STRING_OVERFLOW_WARNING_DISABLE_VERSION)
+    add_compile_options(-Wno-stringop-overflow)
+  endif()
 else()
   message(WARNING "WARNING: Unsupported C compiler `${CMAKE_C_COMPILER_ID}` is used")
   set (PRINT_MIN_C_COMPILER_VER TRUE)
@@ -123,6 +127,7 @@ elseif (${CMAKE_BUILD_TYPE_LC} MATCHES "coverity")
 elseif (${CMAKE_BUILD_TYPE_LC} MATCHES "gcov")
   add_compile_options(-O0 -fprofile-arcs -ftest-coverage)
   add_compile_definitions(CLIB_DEBUG CLIB_GCOV)
+  link_libraries(gcov)
 endif()
 
 set(BUILD_TYPES release debug coverity gcov)