summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-19 00:48:56 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-19 00:48:56 +0100
commit0b4a9d877069ac488f409bec4f526686422dff69 (patch)
tree98b523856b9518415d23dc9aaa6ef4c0f315d247 /CMakeLists.txt
parentb573153520d778d21904ce002a225715675f30e0 (diff)
added ENABLE_GCOV flag to CMakeLists
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 81ed626..7bf4724 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,6 +43,12 @@ OPTION(BUILD_DOCUMENTATION
# Enable C++11 and all warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic-errors -std=c++11")
+# Flag for enabling the generation of data for gcov
+OPTION(ENABLE_GCOV "Enables the compiler flags needed for gcov/lcov" OFF)
+IF (ENABLE_GCOV)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
+ENDIF()
+
# Include expat and mozjs-24 via PkgConfig
FIND_PACKAGE(PkgConfig REQUIRED)
PKG_CHECK_MODULES(MOZJS REQUIRED mozjs-24)