Skip to content

Commit a6daf68

Browse files
authored
remove debug flag (#228)
1 parent eb37f32 commit a6daf68

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,7 @@ add_executable(procdump
181181
${PROJECT_BINARY_DIR}/ProcDumpProfiler.o
182182
)
183183

184-
target_compile_options(procdump PRIVATE -g -pthread -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Werror -D_GNU_SOURCE -std=c++11)
185-
if (NOT DEFINED ENV{DEBUG})
186-
message(STATUS "procdump DEBUG disabled. Enabling optimizations.")
187-
add_compile_options(procdump -O2)
188-
else()
189-
message(STATUS "procdump DEBUG enabled. Disabling optimizations.")
190-
endif()
191-
184+
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)
192185

193186
target_include_directories(procdump PUBLIC
194187
${procdump_INC}
@@ -217,14 +210,7 @@ add_executable(ProcDumpTestApplication
217210
${procdump_Test}/ProcDumpTestApplication.c
218211
)
219212

220-
target_compile_options(ProcDumpTestApplication PRIVATE -g -pthread -std=gnu99 -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -Werror)
221-
if (NOT DEFINED ENV{DEBUG})
222-
message(STATUS "ProcDumpTestApplication DEBUG disabled. Enabling optimizations.")
223-
add_compile_options(ProcDumpTestApplication -O2)
224-
else()
225-
message(STATUS "ProcDumpTestApplication DEBUG enabled. Disabling optimizations.")
226-
endif()
227-
213+
target_compile_options(ProcDumpTestApplication PRIVATE -g -pthread -std=gnu99 -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -Werror -O2)
228214

229215
target_include_directories(ProcDumpTestApplication PUBLIC
230216
/usr/include

0 commit comments

Comments
 (0)