diff options
| author | 2015-01-10 16:04:56 -0500 | |
|---|---|---|
| committer | 2015-01-10 16:04:56 -0500 | |
| commit | 083072de56dacadbeba5f77b2773ea6f9e4b1ddd (patch) | |
| tree | 15b9987b33a0936d77600691f91e860d273f200b | |
| parent | Merge pull request #455 from yuriks/handle-reform3 (diff) | |
| parent | CMake: Consistently set _DEBUG and NDEBUG in all platforms (diff) | |
| download | yuzu-083072de56dacadbeba5f77b2773ea6f9e4b1ddd.tar.gz yuzu-083072de56dacadbeba5f77b2773ea6f9e4b1ddd.tar.xz yuzu-083072de56dacadbeba5f77b2773ea6f9e4b1ddd.zip | |
Merge pull request #458 from yuriks/cmake-debug
CMake: Consistently set _DEBUG and NDEBUG in all platforms
| -rw-r--r-- | CMakeLists.txt | 6 |
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() | |||
| 24 | # /GR- - Disable RTTI | 24 | # /GR- - Disable RTTI |
| 25 | # /GS- - No stack buffer overflow checks | 25 | # /GS- - No stack buffer overflow checks |
| 26 | # /EHsc - C++-only exception handling semantics | 26 | # /EHsc - C++-only exception handling semantics |
| 27 | set(optimization_flags "/MP /MD /Ox /Oy- /DNDEBUG /GR- /GS- /EHsc") | 27 | set(optimization_flags "/MP /MD /Ox /Oy- /GR- /GS- /EHsc") |
| 28 | # /Zi - Output debugging information | 28 | # /Zi - Output debugging information |
| 29 | # /Zo - enahnced debug info for optimized builds | 29 | # /Zo - enahnced debug info for optimized builds |
| 30 | set(CMAKE_C_FLAGS_RELEASE "${optimization_flags} /Zi" CACHE STRING "" FORCE) | 30 | set(CMAKE_C_FLAGS_RELEASE "${optimization_flags} /Zi" CACHE STRING "" FORCE) |
| @@ -32,7 +32,11 @@ else() | |||
| 32 | set(CMAKE_C_FLAGS_RELWITHDEBINFO "${optimization_flags} /Zi /Zo" CACHE STRING "" FORCE) | 32 | set(CMAKE_C_FLAGS_RELWITHDEBINFO "${optimization_flags} /Zi /Zo" CACHE STRING "" FORCE) |
| 33 | set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${optimization_flags} /Zi /Zo" CACHE STRING "" FORCE) | 33 | set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${optimization_flags} /Zi /Zo" CACHE STRING "" FORCE) |
| 34 | endif() | 34 | endif() |
| 35 | |||
| 35 | add_definitions(-DSINGLETHREADED) | 36 | add_definitions(-DSINGLETHREADED) |
| 37 | # CMake seems to only define _DEBUG on Windows | ||
| 38 | set_property(DIRECTORY APPEND PROPERTY | ||
| 39 | COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG> $<$<NOT:$<CONFIG:Debug>>:NDEBUG>) | ||
| 36 | 40 | ||
| 37 | find_package(PNG QUIET) | 41 | find_package(PNG QUIET) |
| 38 | if (PNG_FOUND) | 42 | if (PNG_FOUND) |