Skip to content

Commit 4855798

Browse files
Optional coverage in debug too
1 parent 867659b commit 4855798

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
55
include( Common )
66
include( Tools )
77

8-
project( consulcpp VERSION 0.2.1 DESCRIPTION "A C++ library that implements the Consul API" LANGUAGES CXX )
8+
project( consulcpp VERSION 0.2.2 DESCRIPTION "A C++ library that implements the Consul API" LANGUAGES CXX )
9+
10+
option( BUILD_EXAMPLES "Build examples" ON )
11+
option( ADD_COVERAGE "Add coverage" OFF )
912

1013
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
1114
include( CTest )
12-
if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND UNIX)
15+
if( ADD_COVERAGE )
1316
include( CodeCoverage )
1417
append_coverage_compiler_flags()
1518
setup_target_for_coverage_gcovr(
@@ -19,8 +22,6 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
1922
endif()
2023
endif()
2124

22-
option( BUILD_EXAMPLES "Build examples" ON )
23-
2425
sonarqube_setup()
2526

2627
add_subdirectory( src )

0 commit comments

Comments
 (0)