Skip to content

Commit

Permalink
build: Add additional compiler warnings in debug build (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
hparzych authored Sep 21, 2023
1 parent 18bc390 commit aac3887
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ project(

set(BPF_C_FLAGS ${BPF_C_FLAGS} -DTARGET_BPF)

# Set DEBUG macro in debug build
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
# Set DEBUG macro in debug build and add additional warnings
set(EXTRA_DEBUG_FLAGS -DDEBUG -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(BPF_C_FLAGS ${BPF_C_FLAGS} -DDEBUG)
add_compile_options(${EXTRA_DEBUG_FLAGS})
set(BPF_C_FLAGS ${BPF_C_FLAGS} ${EXTRA_DEBUG_FLAGS})
endif()

set(Boost_USE_STATIC_LIBS ON)
Expand Down

0 comments on commit aac3887

Please sign in to comment.