Skip to content

Commit a5c5c19

Browse files
committed
[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="
1 parent 88b3d86 commit a5c5c19

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

dll/3rdparty/libpng/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
add_definitions(
33
-DWIN32
4-
-DNDEBUG
4+
-DNDEBUG=
55
-D_WINDOWS
66
-DPNG_BUILD_DLL)
77

dll/3rdparty/libtiff/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
add_definitions(
33
-DWIN32
4-
-DNDEBUG
4+
-DNDEBUG=
55
-DUSE_WIN32_FILEIO
66
-DTIF_PLATFORM_CONSOLE)
77

dll/opengl/glu32/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include_directories(BEFORE
88

99
add_definitions(
1010
-DBUILD_GLU32
11-
-DNDEBUG
11+
-DNDEBUG=
1212
-DLIBRARYBUILD
1313
-DRESOLVE_3D_TEXTURE_SUPPORT)
1414

overrides-gcc.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
foreach(lang C CXX ASM)
22
set(CMAKE_${lang}_FLAGS_DEBUG "")
3-
set(CMAKE_${lang}_FLAGS_MINSIZEREL "-Os -DNDEBUG")
3+
set(CMAKE_${lang}_FLAGS_MINSIZEREL "-Os -DNDEBUG=")
44
set(CMAKE_${lang}_FLAGS_RELEASE "")
5-
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
5+
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG=")
66
set(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "")
77
set(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "")
88
endforeach()

sdk/cmake/gcc.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ endif()
141141
# Optimizations
142142
# FIXME: Revisit this to see if we even need these levels
143143
if(CMAKE_BUILD_TYPE STREQUAL "Release")
144-
add_compile_options(-O2 -DNDEBUG)
144+
add_compile_options(-O2 -DNDEBUG=)
145145
else()
146146
if(OPTIMIZE STREQUAL "1")
147147
add_compile_options(-Os)

0 commit comments

Comments
 (0)