Disable assertions in non-debug builds

Making the engine terminate when an assertion fails is a good thing in
debug builds, but keeping them enabled in release builds only hurts our
users.
alternate-lights
Nicolas Hake 2015-02-20 23:36:36 +01:00
parent 6e41694495
commit 0b55cea227
1 changed files with 4 additions and 0 deletions

View File

@ -1148,11 +1148,15 @@ endif()
set_property(TARGET openclonk APPEND PROPERTY COMPILE_DEFINITIONS GLEW_STATIC)
if(NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.10")
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG>)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:NDEBUG>)
else()
# CMake started supporting generator expressions in 2.8.10. Earlier
# versions pass most of this through unmodified, which confuses make.
# Once we stop supporting old versions of CMake, this case can be removed.
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE NDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO NDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL NDEBUG)
endif()
# This expands some variables in Info.plist as a side-effect. XCode might then