more rigorous command line option checking; ensure parser errors are printed to stderr
[pingcheck] / CMakeLists.txt
CommitLineData
0dc2435f 1# project: definitions
aca0d1d7 2project(pingcheck)
0dc2435f
GMF
3set(VERSION 0.1)
4set(TARGET ${PROJECT_NAME})
4ea9706c 5
67016f61 6# cmake: build options
96d2fb59
TJ
7if("${CMAKE_BUILD_TYPE}" STREQUAL "")
8 set(CMAKE_BUILD_TYPE Debug)
9endif("${CMAKE_BUILD_TYPE}" STREQUAL "")
10set(CMAKE_COLOR_MAKEFILE ON)
11cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
0dc2435f
GMF
12
13# compiler: add definitions and arguments to the compiler
2d591235 14add_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
26set(CPACK_PACKAGE_VERSION ${VERSION})
27set(CPACK_PACKAGE_CONTACT "Intra2net AG")
28set(CPACK_PACKAGE_DESCRIPTION ${TARGET})
29set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Pingcheck")
30set(CPACK_SOURCE_GENERATOR TGZ)
31set(CPACK_SOURCE_IGNORE_FILES "\\\\.git;build;build-rpm")
96d2fb59
TJ
32set(CPACK_SOURCE_IGNORE_FILES
33 "~$"
34 "\\\\.git"
ca04b620 35 "\\\\.kdev4"
96d2fb59
TJ
36 "build"
37 "build-rpm"
38)
0dc2435f 39set(CPACK_SOURCE_PACKAGE_FILE_NAME "${TARGET}-${VERSION}")
235ffac2 40
67016f61 41# cmake: build the application in the source directory
0dc2435f
GMF
42add_subdirectory(src)
43
67016f61
GMF
44# cmake: build the test cases
45add_subdirectory(test)
46
0dc2435f 47include(CPack)