comparison 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
comparison
equal deleted inserted replaced
23:7d07d261b003 24:de67047ca229
1 cmake_minimum_required(VERSION 2.8.8) 1 cmake_minimum_required(VERSION 2.8.8)
2 project(m13) 2 project(m13)
3
4 include(CTest)
3 5
4 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") 6 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
5 7
6 # Use cmake's automoc and make sure the generated files are included 8 # Use cmake's automoc and make sure the generated files are included
7 set(CMAKE_AUTOMOC ON) 9 set(CMAKE_AUTOMOC ON)
47 49
48 # Hardening flags 50 # Hardening flags
49 set(HARDENING_FLAGS " -Wall -Werror -fstack-protector-all -fno-exceptions") 51 set(HARDENING_FLAGS " -Wall -Werror -fstack-protector-all -fno-exceptions")
50 set(HARDENING_FLAGS " ${HARDENING_FLAGS} -Wstack-protector") 52 set(HARDENING_FLAGS " ${HARDENING_FLAGS} -Wstack-protector")
51 set(HARDENING_FLAGS " ${HARDENING_FLAGS} --param ssp-buffer-size=4") 53 set(HARDENING_FLAGS " ${HARDENING_FLAGS} --param ssp-buffer-size=4")
52 set(HARDENING_FLAGS " ${HARDENING_FLAGS} -D_FORTIFY_SOURCE=2 -O2") 54 set(HARDENING_FLAGS " ${HARDENING_FLAGS} -D_FORTIFY_SOURCE=2 -O0 -fprofile-arcs -ftest-coverage")
55
56 SET(CMAKE_EXE_LINKER_FLAGS="-fprofile-arcs -ftest-coverage")
53 57
54 if(UNIX) 58 if(UNIX)
55 # See: https://bugreports.qt-project.org/browse/QTBUG-35918 59 # See: https://bugreports.qt-project.org/browse/QTBUG-35918
56 # XCB_EXTRA_LIBS should be gotten automatically. 60 # XCB_EXTRA_LIBS should be gotten automatically.
57 # The following list is taken from the .pri file 61 # The following list is taken from the .pri file
91 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HARDENING_FLAGS}") 95 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HARDENING_FLAGS}")
92 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARN_HARDENING_FLAGS} ${HARDENING_FLAGS}") 96 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARN_HARDENING_FLAGS} ${HARDENING_FLAGS}")
93 97
94 add_executable(m13ui ${M13UI_SOURCES} ${M13UI_MAIN}) 98 add_executable(m13ui ${M13UI_SOURCES} ${M13UI_MAIN})
95 99
96 target_link_libraries(m13ui Qt5::Widgets ${EXTRA_STATIC_LIBS}) 100 target_link_libraries(m13ui Qt5::Widgets ${EXTRA_STATIC_LIBS} gcov)
97 101
98 add_custom_target(static_check) 102 add_custom_target(static_check)
99 103
100 # CPPCheck 104 # CPPCheck
101 include(GenerateCppcheck) 105 include(GenerateCppcheck)
112 add_dependencies(static_check flawfinder) 116 add_dependencies(static_check flawfinder)
113 endif (FLAWFINDER_PATH) 117 endif (FLAWFINDER_PATH)
114 118
115 # Tests 119 # Tests
116 add_subdirectory(tests) 120 add_subdirectory(tests)
121
122 # Documentation
123 configure_file (doc/Doxyfile.in doc/Doxyfile)
124 add_subdirectory(doc)

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