diff CMakeLists.txt @ 24:de67047ca229

Add documentation generation
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 21 Feb 2014 15:12:24 +0000
parents bc302bbceaf5
children 92108a2120f1
line wrap: on
line diff
--- a/CMakeLists.txt	Thu Feb 20 15:44:40 2014 +0000
+++ b/CMakeLists.txt	Fri Feb 21 15:12:24 2014 +0000
@@ -1,6 +1,8 @@
 cmake_minimum_required(VERSION 2.8.8)
 project(m13)
 
+include(CTest)
+
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
 
 # Use cmake's automoc and make sure the generated files are included
@@ -49,7 +51,9 @@
 set(HARDENING_FLAGS " -Wall -Werror -fstack-protector-all -fno-exceptions")
 set(HARDENING_FLAGS " ${HARDENING_FLAGS} -Wstack-protector")
 set(HARDENING_FLAGS " ${HARDENING_FLAGS} --param ssp-buffer-size=4")
-set(HARDENING_FLAGS " ${HARDENING_FLAGS} -D_FORTIFY_SOURCE=2 -O2")
+set(HARDENING_FLAGS " ${HARDENING_FLAGS} -D_FORTIFY_SOURCE=2 -O0 -fprofile-arcs -ftest-coverage")
+
+SET(CMAKE_EXE_LINKER_FLAGS="-fprofile-arcs -ftest-coverage")
 
 if(UNIX)
    # See: https://bugreports.qt-project.org/browse/QTBUG-35918
@@ -93,7 +97,7 @@
 
 add_executable(m13ui ${M13UI_SOURCES} ${M13UI_MAIN})
 
-target_link_libraries(m13ui Qt5::Widgets ${EXTRA_STATIC_LIBS})
+target_link_libraries(m13ui Qt5::Widgets ${EXTRA_STATIC_LIBS} gcov)
 
 add_custom_target(static_check)
 
@@ -114,3 +118,7 @@
 
 # Tests
 add_subdirectory(tests)
+
+# Documentation
+configure_file (doc/Doxyfile.in doc/Doxyfile)
+add_subdirectory(doc)

http://wald.intevation.org/projects/trustbridge/