Skip to content

Commit

Permalink
Merge pull request #24 from hadriansecurity/23-fix-compile
Browse files Browse the repository at this point in the history
CMakeLists: suppress gcc false positive dangling reference warnings
  • Loading branch information
Geertiebear authored Aug 16, 2024
2 parents 401746d + 99c4997 commit fa48aaa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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()
endif()

0 comments on commit fa48aaa

Please sign in to comment.