Skip to content

Commit 1dfbc4c

Browse files
committed
CMakeList.txt verbessert
1 parent 4d36872 commit 1dfbc4c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CMakeLists.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@ if(NOT DEFINED CMAKE_CXX_STANDARD)
1919
add_compile_options("-Wall" "-Wpedantic" "-Wextra" "-fexceptions")
2020
endif()
2121
else()
22-
message(STATUS "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} set by parent project.")
22+
message(STATUS "${PROJECT_NAME}: CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} set by parent project.")
2323
endif()
2424
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2525

26+
string(FIND "${CMAKE_CXX_FLAGS_DEBUG}" "-O0" nPos)
27+
if(${nPos} EQUAL "-1")
28+
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -ggdb -D_DEBUG -DDEBUG")
29+
else()
30+
message(STATUS "${PROJECT_NAME}: CMAKE_CXX_FLAGS_DEBUG hat bereits -O0 enthalten")
31+
endif()
32+
2633
set(targetSrc
2734
${CMAKE_CURRENT_LIST_DIR}/ServMain.cpp
2835
)

0 commit comments

Comments
 (0)