From f68dc6210fe9b5f84c1f9fb3e57fc6285d71856c Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 27 Jun 2014 09:24:11 +0200 Subject: Moved CodeCoverage into a separate cmake condition. --- SetFlags.cmake | 8 ++++++-- 1 file 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") -- cgit v1.2.3