4 set(VERSION_REVISION 0)
5 set(TARGET ${PROJECT_NAME})
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)
14 # compiler: add definitions and arguments to the compiler
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
22 -DVERSION_STRING=${VERSION}
23 -DPROJECT_NAME=\"${PROJECT_NAME}\"
24 -DVERSION_REVISION_STRING=${VERSION_REVISION}
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
41 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${TARGET}-${VERSION}")
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})
50 # cmake: build the application in the source directory
53 # cmake: build the test cases
54 add_subdirectory(test)