diff --git a/CMakeLists.txt b/CMakeLists.txt index e66ab97..ca1e3a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # Find DPDK find_package(dpdk REQUIRED) +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "14.0.0") + add_compile_options(-Wno-dangling-reference) +endif() + # Force Colored Output if (${FORCE_COLORED_OUTPUT}) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") @@ -173,4 +177,4 @@ elseif("${NIC_TYPE}" STREQUAL "I40E") target_compile_definitions("${PROJ_NAME}_libs" PUBLIC NIC_I40E) else() message(FATAL_ERROR "Invalid NIC type detected: ${NIC_TYPE}") -endif() \ No newline at end of file +endif()