summaryrefslogtreecommitdiffstats
path: root/SetFlags.cmake
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-06-27 09:24:11 +0200
committermadmaxoft <github@xoft.cz>2014-06-27 09:24:11 +0200
commitf68dc6210fe9b5f84c1f9fb3e57fc6285d71856c (patch)
tree06a4a4141d16362fccdfb74db245857356f666c4 /SetFlags.cmake
parentMerged branch 'howaner/Bow'. (diff)
downloadcuberite-f68dc6210fe9b5f84c1f9fb3e57fc6285d71856c.tar
cuberite-f68dc6210fe9b5f84c1f9fb3e57fc6285d71856c.tar.gz
cuberite-f68dc6210fe9b5f84c1f9fb3e57fc6285d71856c.tar.bz2
cuberite-f68dc6210fe9b5f84c1f9fb3e57fc6285d71856c.tar.lz
cuberite-f68dc6210fe9b5f84c1f9fb3e57fc6285d71856c.tar.xz
cuberite-f68dc6210fe9b5f84c1f9fb3e57fc6285d71856c.tar.zst
cuberite-f68dc6210fe9b5f84c1f9fb3e57fc6285d71856c.zip
Diffstat (limited to '')
-rw-r--r--SetFlags.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/SetFlags.cmake b/SetFlags.cmake
index 6e2417a51..b01643f4e 100644
--- a/SetFlags.cmake
+++ b/SetFlags.cmake
@@ -26,10 +26,14 @@ endmacro()
macro(set_flags)
- # Add the preprocessor macros used for distinguishing between debug and release builds (CMake does this automatically for MSVC):
- if (NOT MSVC)
+ # Add coverage processing, if requested:
+ if (BUILD_WITH_COVERAGE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/lib/cmake-coverage/")
include(CodeCoverage)
+ endif()
+
+ # Add the preprocessor macros used for distinguishing between debug and release builds (CMake does this automatically for MSVC):
+ if (NOT MSVC)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -D_DEBUG")