Don't set debug flags in non-debug builds (to shut up the compiler).

This commit is contained in:
Bartosz Taudul 2024-05-24 01:16:06 +02:00
parent c5e64a182c
commit 005d092903
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -47,6 +47,8 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(MOLD_LINKER)
set(CMAKE_LINKER_TYPE "MOLD")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-eliminate-unused-debug-types")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-eliminate-unused-debug-types")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-eliminate-unused-debug-types")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-eliminate-unused-debug-types")
endif()
endif()