summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-07-19 18:58:37 +0300
committerKonstantin Käfer <mail@kkaefer.com>2016-08-05 11:42:22 +0200
commit0fb3b6e333901df313d404ab7507cbb4fa6baf09 (patch)
tree8ce6fae9f6dd19d295036adf03c0a3d4eed3c090 /CMakeLists.txt
parent023ff83d881fb810f4428594ca476bb436b303f6 (diff)
downloadqtlocation-mapboxgl-0fb3b6e333901df313d404ab7507cbb4fa6baf09.tar.gz
[build] Re-enable coverage run
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 04b2b6c051..a7e4e1ca59 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,7 @@ mason_use(protozero 1.3.0)
mason_use(pixelmatch 0.9.0)
option(WITH_CXX11ABI "Use cxx11abi mason packages" OFF)
+option(WITH_COVERAGE "Enable coverage reports" OFF)
if(WITH_CXX11ABI)
mason_use(geojson 0.1.4-cxx11abi)
@@ -26,6 +27,11 @@ else()
mason_use(gtest 1.7.0)
endif()
+if(WITH_COVERAGE)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
+endif(WITH_COVERAGE)
+
set(CMAKE_CONFIGURATION_TYPES Debug Release)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -Wshadow -Wno-variadic-macros -Wno-unknown-pragmas")