Commit | Line | Data |
---|---|---|
0dc2435f | 1 | # project: definitions |
aca0d1d7 | 2 | project(pingcheck) |
0dc2435f GMF |
3 | set(VERSION 0.1) |
4 | set(TARGET ${PROJECT_NAME}) | |
4ea9706c | 5 | |
67016f61 | 6 | # cmake: build options |
96d2fb59 TJ |
7 | if("${CMAKE_BUILD_TYPE}" STREQUAL "") |
8 | set(CMAKE_BUILD_TYPE Debug) | |
9 | endif("${CMAKE_BUILD_TYPE}" STREQUAL "") | |
10 | set(CMAKE_COLOR_MAKEFILE ON) | |
11 | cmake_minimum_required(VERSION 2.6 FATAL_ERROR) | |
0dc2435f GMF |
12 | |
13 | # compiler: add definitions and arguments to the compiler | |
2d591235 | 14 | add_definitions( |
451c9121 | 15 | -Wall -Wextra -Weffc++ -Wshadow -Wcast-qual -Wconversion -pedantic |
2a0be166 GMF |
16 | -Wabi -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute |
17 | -Wno-long-long -Woverloaded-virtual -Wpacked -Wredundant-decls -Wsign-promo | |
c8f43b20 | 18 | -Wstack-protector -fstack-protector |
ba427d60 | 19 | #-Werror |
6e09425c | 20 | #-O2 |
451c9121 | 21 | -DVERSION_STRING=${VERSION} |
c3535345 | 22 | -DPROJECT_NAME=\"${PROJECT_NAME}\" |
2d591235 | 23 | ) |
4c2fe1f1 | 24 | |
0dc2435f GMF |
25 | # package: package information |
26 | set(CPACK_PACKAGE_VERSION ${VERSION}) | |
27 | set(CPACK_PACKAGE_CONTACT "Intra2net AG") | |
28 | set(CPACK_PACKAGE_DESCRIPTION ${TARGET}) | |
29 | set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Pingcheck") | |
30 | set(CPACK_SOURCE_GENERATOR TGZ) | |
31 | set(CPACK_SOURCE_IGNORE_FILES "\\\\.git;build;build-rpm") | |
96d2fb59 TJ |
32 | set(CPACK_SOURCE_IGNORE_FILES |
33 | "~$" | |
34 | "\\\\.git" | |
ca04b620 | 35 | "\\\\.kdev4" |
96d2fb59 TJ |
36 | "build" |
37 | "build-rpm" | |
38 | ) | |
0dc2435f | 39 | set(CPACK_SOURCE_PACKAGE_FILE_NAME "${TARGET}-${VERSION}") |
235ffac2 | 40 | |
67016f61 | 41 | # cmake: build the application in the source directory |
0dc2435f GMF |
42 | add_subdirectory(src) |
43 | ||
67016f61 GMF |
44 | # cmake: build the test cases |
45 | add_subdirectory(test) | |
46 | ||
0dc2435f | 47 | include(CPack) |