Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMakeLists: suppress gcc false positive dangling reference warnings #24

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()
Loading