Merge pull request #1288 from bytzo/cmake-fix-persistent-debug-symbols

Make CMake only include debug symbols when appropriate
pull/1319/head
Rémi Verschelde 2023-11-24 12:35:22 +01:00
commit 7fb8acaa53
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 3 deletions

View File

@ -99,10 +99,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_definitions(-DNOMINMAX) add_definitions(-DNOMINMAX)
else() # GCC/Clang else() # GCC/Clang
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -g")
if(CMAKE_BUILD_TYPE MATCHES Debug) if(CMAKE_BUILD_TYPE MATCHES Debug)
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -fno-omit-frame-pointer -O0") set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -fno-omit-frame-pointer -O0 -g")
else() else()
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -O3") set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -O3")
endif(CMAKE_BUILD_TYPE MATCHES Debug) endif(CMAKE_BUILD_TYPE MATCHES Debug)