changed value of link_up/down_interval from minutes to seconds
[pingcheck] / CMakeLists.txt
1 # project: definitions
2 project(pingcheck)
3 set(VERSION 0.6)
4 set(VERSION_REVISION 2)
5 set(TARGET ${PROJECT_NAME})
6
7 # cmake: build options
8 if("${CMAKE_BUILD_TYPE}" STREQUAL "")
9    set(CMAKE_BUILD_TYPE     Debug)
10 endif("${CMAKE_BUILD_TYPE}" STREQUAL "")
11 set(CMAKE_COLOR_MAKEFILE ON)
12 cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
13
14 # compiler: add definitions and arguments to the compiler
15 add_definitions(
16     -Wall -Wextra -Weffc++ -Wshadow -Wcast-qual -Wconversion -pedantic
17     -Wabi -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute
18     -Wno-long-long -Woverloaded-virtual -Wpacked -Wredundant-decls -Wsign-promo
19     -Wstack-protector -fstack-protector
20     #-Werror
21     #-O2
22     -DVERSION_STRING=${VERSION}
23     -DPROJECT_NAME=\"${PROJECT_NAME}\"
24     -DVERSION_REVISION_STRING=${VERSION_REVISION}
25 )
26
27 # package: package information
28 set(CPACK_PACKAGE_VERSION ${VERSION})
29 set(CPACK_PACKAGE_CONTACT "Intra2net AG")
30 set(CPACK_PACKAGE_DESCRIPTION ${TARGET})
31 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Pingcheck")
32 set(CPACK_SOURCE_GENERATOR TGZ)
33 set(CPACK_SOURCE_IGNORE_FILES "\\\\.git;build;build-rpm")
34 set(CPACK_SOURCE_IGNORE_FILES
35     "~$"
36     "\\\\.git"
37     "\\\\.kdev4"
38     "build"
39     "build-rpm"
40 )
41 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${TARGET}-${VERSION}")
42
43 # "make dist" target
44 set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${VERSION})
45 add_custom_target(dist
46     COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
47             | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
48     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
49
50 # cmake: build the application in the source directory
51 add_subdirectory(src)
52
53 # cmake: build the test cases
54 add_subdirectory(test)
55
56 include(CPack)