[CMAKE] Fix warning about redefinition of NDEBUG on release builds

"-DNDEBUG" will result in NDEBUG being defined as 0. To define it to nothing, like we do in our code, it must be "-DNDEBUG="
This commit is contained in:
Timo Kreuzer 2024-10-19 12:01:50 +03:00
parent 88b3d86b29
commit a5c5c19bcf
5 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
add_definitions(
-DWIN32
-DNDEBUG
-DNDEBUG=
-D_WINDOWS
-DPNG_BUILD_DLL)

View File

@ -1,7 +1,7 @@
add_definitions(
-DWIN32
-DNDEBUG
-DNDEBUG=
-DUSE_WIN32_FILEIO
-DTIF_PLATFORM_CONSOLE)

View File

@ -8,7 +8,7 @@ include_directories(BEFORE
add_definitions(
-DBUILD_GLU32
-DNDEBUG
-DNDEBUG=
-DLIBRARYBUILD
-DRESOLVE_3D_TEXTURE_SUPPORT)

View File

@ -1,8 +1,8 @@
foreach(lang C CXX ASM)
set(CMAKE_${lang}_FLAGS_DEBUG "")
set(CMAKE_${lang}_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_${lang}_FLAGS_MINSIZEREL "-Os -DNDEBUG=")
set(CMAKE_${lang}_FLAGS_RELEASE "")
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG=")
set(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "")
set(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "")
endforeach()

View File

@ -141,7 +141,7 @@ endif()
# Optimizations
# FIXME: Revisit this to see if we even need these levels
if(CMAKE_BUILD_TYPE STREQUAL "Release")
add_compile_options(-O2 -DNDEBUG)
add_compile_options(-O2 -DNDEBUG=)
else()
if(OPTIMIZE STREQUAL "1")
add_compile_options(-Os)