annotate CMakeLists.txt @ 31:37fc66967517

Implement signature verification wiht polarssl
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 13 Mar 2014 18:12:16 +0000
parents cbd57d767dfa
children bee7d274c4dc
rev   line source
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
1 cmake_minimum_required(VERSION 2.8.8)
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
2 project(m13)
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
3
26
cbd57d767dfa Move layout around. Restructure CMakeLists
Andre Heinecke <andre.heinecke@intevation.de>
parents: 25
diff changeset
4 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
cbd57d767dfa Move layout around. Restructure CMakeLists
Andre Heinecke <andre.heinecke@intevation.de>
parents: 25
diff changeset
5
24
de67047ca229 Add documentation generation
Andre Heinecke <aheinecke@intevation.de>
parents: 22
diff changeset
6 include(CTest)
26
cbd57d767dfa Move layout around. Restructure CMakeLists
Andre Heinecke <andre.heinecke@intevation.de>
parents: 25
diff changeset
7 include(GenerateCppcheck)
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
8
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
9 # Use cmake's automoc and make sure the generated files are included
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
10 set(CMAKE_AUTOMOC ON)
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
11 set(CMAKE_INCLUDE_CURRENT_DIR ON)
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
12
7
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents: 4
diff changeset
13 # Default to debug build
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents: 4
diff changeset
14 if (NOT CMAKE_BUILD_TYPE)
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents: 4
diff changeset
15 set (CMAKE_BUILD_TYPE Debug)
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents: 4
diff changeset
16 endif (NOT CMAKE_BUILD_TYPE)
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents: 4
diff changeset
17
1
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
18 # Warn level to be used for privileged parts
13
e26f9cc93601 Also add Wall to GUI components. Link with crypto32 on windows
Andre Heinecke <aheinecke@intevation.de>
parents: 11
diff changeset
19 set(WARN_HARDENING_FLAGS " -Wextra -Wconversion -Wformat-security")
1
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
20
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
21 # Hardening flags
21
dc1e1e9e62ce Add certificate class and use it
Andre Heinecke <aheinecke@intevation.de>
parents: 18
diff changeset
22 set(HARDENING_FLAGS " -Wall -Werror -fstack-protector-all -fno-exceptions")
1
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
23 set(HARDENING_FLAGS " ${HARDENING_FLAGS} -Wstack-protector")
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
24 set(HARDENING_FLAGS " ${HARDENING_FLAGS} --param ssp-buffer-size=4")
26
cbd57d767dfa Move layout around. Restructure CMakeLists
Andre Heinecke <andre.heinecke@intevation.de>
parents: 25
diff changeset
25 set(HARDENING_FLAGS " ${HARDENING_FLAGS} -D_FORTIFY_SOURCE=2 -O0")
24
de67047ca229 Add documentation generation
Andre Heinecke <aheinecke@intevation.de>
parents: 22
diff changeset
26
26
cbd57d767dfa Move layout around. Restructure CMakeLists
Andre Heinecke <andre.heinecke@intevation.de>
parents: 25
diff changeset
27 # Uncomment to enable profiling
cbd57d767dfa Move layout around. Restructure CMakeLists
Andre Heinecke <andre.heinecke@intevation.de>
parents: 25
diff changeset
28 # set(PROFILING_FLAGS "-fprofile-arcs -ftest-coverage")
cbd57d767dfa Move layout around. Restructure CMakeLists
Andre Heinecke <andre.heinecke@intevation.de>
parents: 25
diff changeset
29
cbd57d767dfa Move layout around. Restructure CMakeLists
Andre Heinecke <andre.heinecke@intevation.de>
parents: 25
diff changeset
30 SET(CMAKE_EXE_LINKER_FLAGS=${PROFILING_FLAGS})
1
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
31
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
32 if(UNIX)
4
9849250f50f2 Start implementation of certificatelist parser
Andre Heinecke <aheinecke@intevation.de>
parents: 1
diff changeset
33 set(HARDENING_FLAGS " ${HARDENING_FLAGS} -pie -fPIE -ftrapv")
9849250f50f2 Start implementation of certificatelist parser
Andre Heinecke <aheinecke@intevation.de>
parents: 1
diff changeset
34 set(HARDENING_FLAGS " ${HARDENING_FLAGS} -Wl,-z,relro,-z,now")
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
35 elseif(WIN32)
4
9849250f50f2 Start implementation of certificatelist parser
Andre Heinecke <aheinecke@intevation.de>
parents: 1
diff changeset
36 set(HARDENING_FLAGS " ${HARDENING_FLAGS} -Wl,--dynamicbase -Wl,--nxcompat")
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
37 endif()
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
38
1
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
39 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HARDENING_FLAGS}")
7
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents: 4
diff changeset
40 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARN_HARDENING_FLAGS} ${HARDENING_FLAGS}")
1
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
41
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
42 # FlawFinder
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
43 find_program(FLAWFINDER_PATH flawfinder DOC "flawfinder path")
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
44 if (FLAWFINDER_PATH)
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
45 add_custom_target(flawfinder COMMENT "FlawFinder" VERBATIM COMMAND ${FLAWFINDER_PATH}
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
46 ${CMAKE_SOURCE_DIR}/ui
18
f4f957c58e0a Move listuitol and add cert pinning with a test certificate
Andre Heinecke <aheinecke@intevation.de>
parents: 13
diff changeset
47 ${CMAKE_SOURCE_DIR}/cinst
25
92108a2120f1 Move certificatelist to common. Add cinst directory
Andre Heinecke <aheinecke@intevation.de>
parents: 24
diff changeset
48 ${CMAKE_SOURCE_DIR}/common
1
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
49 )
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
50 add_dependencies(static_check flawfinder)
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
51 endif (FLAWFINDER_PATH)
524cd4908656 Build infrastructure
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
52
25
92108a2120f1 Move certificatelist to common. Add cinst directory
Andre Heinecke <aheinecke@intevation.de>
parents: 24
diff changeset
53 add_subdirectory(cinst)
26
cbd57d767dfa Move layout around. Restructure CMakeLists
Andre Heinecke <andre.heinecke@intevation.de>
parents: 25
diff changeset
54 add_subdirectory(ui)
24
de67047ca229 Add documentation generation
Andre Heinecke <aheinecke@intevation.de>
parents: 22
diff changeset
55
de67047ca229 Add documentation generation
Andre Heinecke <aheinecke@intevation.de>
parents: 22
diff changeset
56 # Documentation
de67047ca229 Add documentation generation
Andre Heinecke <aheinecke@intevation.de>
parents: 22
diff changeset
57 configure_file (doc/Doxyfile.in doc/Doxyfile)
de67047ca229 Add documentation generation
Andre Heinecke <aheinecke@intevation.de>
parents: 22
diff changeset
58 add_subdirectory(doc)

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