4 set(TARGET ${PROJECT_NAME})
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)
13 # compiler: add definitions and arguments to the compiler
15 -Wall -Wextra -Weffc++ -Wshadow -Wcast-qual -Wconversion -pedantic
16 -Wabi -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute
17 -Wno-long-long -Woverloaded-virtual -Wpacked -Wredundant-decls -Wsign-promo
18 -Wstack-protector -fstack-protector
21 -DVERSION_STRING=${VERSION}
22 -DPROJECT_NAME=\"${PROJECT_NAME}\"
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")
32 set(CPACK_SOURCE_IGNORE_FILES
39 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${TARGET}-${VERSION}")
42 set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${VERSION})
43 add_custom_target(dist
44 COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
45 | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
46 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
48 # cmake: build the application in the source directory
51 # cmake: build the test cases
52 add_subdirectory(test)