1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

build/cmake: pass -DNDEBUG by default like msvc

Downstream may override CMAKE_CXX_FLAGS_RELEASE in order to enforce
consistent optimization flags for every package. If -DNDEBUG is lost
RPCS3 may run slower and fall victim to assertions in bundled libs.
This commit is contained in:
Jan Beich 2018-05-11 04:12:58 +00:00 committed by Ani
parent 21dc05265d
commit 2cfb2428d2

View File

@ -81,6 +81,10 @@ add_custom_command(OUTPUT something_that_never_exists
# Check for a sufficient compiler and set build options
include(ConfigureCompiler)
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DNDEBUG)
endif()
if(WIN32)
add_definitions(-DUNICODE)
add_definitions(-D_WIN32_WINNT=0x0601)