Skip to content

Commit

Permalink
remove debug flag (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioHewardt authored Jan 23, 2024
1 parent eb37f32 commit a6daf68
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,7 @@ add_executable(procdump
${PROJECT_BINARY_DIR}/ProcDumpProfiler.o
)

target_compile_options(procdump PRIVATE -g -pthread -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Werror -D_GNU_SOURCE -std=c++11)
if (NOT DEFINED ENV{DEBUG})
message(STATUS "procdump DEBUG disabled. Enabling optimizations.")
add_compile_options(procdump -O2)
else()
message(STATUS "procdump DEBUG enabled. Disabling optimizations.")
endif()

target_compile_options(procdump PRIVATE -g -pthread -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Werror -D_GNU_SOURCE -std=c++11 -O2)

target_include_directories(procdump PUBLIC
${procdump_INC}
Expand Down Expand Up @@ -217,14 +210,7 @@ add_executable(ProcDumpTestApplication
${procdump_Test}/ProcDumpTestApplication.c
)

target_compile_options(ProcDumpTestApplication PRIVATE -g -pthread -std=gnu99 -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -Werror)
if (NOT DEFINED ENV{DEBUG})
message(STATUS "ProcDumpTestApplication DEBUG disabled. Enabling optimizations.")
add_compile_options(ProcDumpTestApplication -O2)
else()
message(STATUS "ProcDumpTestApplication DEBUG enabled. Disabling optimizations.")
endif()

target_compile_options(ProcDumpTestApplication PRIVATE -g -pthread -std=gnu99 -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -Werror -O2)

target_include_directories(ProcDumpTestApplication PUBLIC
/usr/include
Expand Down

0 comments on commit a6daf68

Please sign in to comment.