summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-10 22:04:56 +0100
committerbunnei <bunneidev@gmail.com>2015-01-10 22:04:56 +0100
commit083072de56dacadbeba5f77b2773ea6f9e4b1ddd (patch)
tree15b9987b33a0936d77600691f91e860d273f200b
parentMerge pull request #455 from yuriks/handle-reform3 (diff)
parentCMake: Consistently set _DEBUG and NDEBUG in all platforms (diff)
downloadyuzu-083072de56dacadbeba5f77b2773ea6f9e4b1ddd.tar
yuzu-083072de56dacadbeba5f77b2773ea6f9e4b1ddd.tar.gz
yuzu-083072de56dacadbeba5f77b2773ea6f9e4b1ddd.tar.bz2
yuzu-083072de56dacadbeba5f77b2773ea6f9e4b1ddd.tar.lz
yuzu-083072de56dacadbeba5f77b2773ea6f9e4b1ddd.tar.xz
yuzu-083072de56dacadbeba5f77b2773ea6f9e4b1ddd.tar.zst
yuzu-083072de56dacadbeba5f77b2773ea6f9e4b1ddd.zip
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2711336fb..20a5a011a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,7 +24,7 @@ else()
# /GR- - Disable RTTI
# /GS- - No stack buffer overflow checks
# /EHsc - C++-only exception handling semantics
- set(optimization_flags "/MP /MD /Ox /Oy- /DNDEBUG /GR- /GS- /EHsc")
+ set(optimization_flags "/MP /MD /Ox /Oy- /GR- /GS- /EHsc")
# /Zi - Output debugging information
# /Zo - enahnced debug info for optimized builds
set(CMAKE_C_FLAGS_RELEASE "${optimization_flags} /Zi" CACHE STRING "" FORCE)
@@ -32,7 +32,11 @@ else()
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${optimization_flags} /Zi /Zo" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${optimization_flags} /Zi /Zo" CACHE STRING "" FORCE)
endif()
+
add_definitions(-DSINGLETHREADED)
+# CMake seems to only define _DEBUG on Windows
+set_property(DIRECTORY APPEND PROPERTY
+ COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG> $<$<NOT:$<CONFIG:Debug>>:NDEBUG>)
find_package(PNG QUIET)
if (PNG_FOUND)