Increased warning level.
[pingcheck] / CMakeLists.txt
1 # project: definitions
2 project(pingcheck)
3 set(VERSION 0.1)
4 set(TARGET ${PROJECT_NAME})
5
6 # cmake: build options
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)
12
13 # compiler: add definitions and arguments to the compiler
14 add_definitions(
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     #-Werror
19     #-O2
20     -DVERSION_STRING=${VERSION}
21     -DPROJECT_NAME=\"${PROJECT_NAME}\"
22 )
23
24 # package: package information
25 set(CPACK_PACKAGE_VERSION ${VERSION})
26 set(CPACK_PACKAGE_CONTACT "Intra2net AG")
27 set(CPACK_PACKAGE_DESCRIPTION ${TARGET})
28 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Pingcheck")
29 set(CPACK_SOURCE_GENERATOR TGZ)
30 set(CPACK_SOURCE_IGNORE_FILES "\\\\.git;build;build-rpm")
31 set(CPACK_SOURCE_IGNORE_FILES
32     "~$"
33     "\\\\.git"
34     "\\\\.kdev4"
35     "build"
36     "build-rpm"
37 )
38 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${TARGET}-${VERSION}")
39
40 # cmake: build the application in the source directory
41 add_subdirectory(src)
42
43 # cmake: build the test cases
44 add_subdirectory(test)
45
46 include(CPack)