Comment out -Werror as rpm will compile with -O2 - this results in warnings
[pingcheck] / CMakeLists.txt
1 # IMPORTANT: Do not add whitespaces between cmake commands! This will break
2 # the package build!
3 # Do set(CONTENTS) instead of set( CONTENTS ) or set (CONTENTS)
4
5 # cmake: required version
6 cmake_minimum_required (VERSION 2.6)
7
8 # cmake: set the directory where the executable will be placed
9 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
10
11 # cmake: set the directory where the make install places the executable
12 set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR})
13
14 # project: definitions
15 project(libpingcheck)
16 set(VERSION 0.1)
17 set(TARGET ${PROJECT_NAME})
18
19 # compiler: disable the full compiler output
20 set(CMAKE_VERBOSE_MAKEFILE OFF)
21
22 # compiler: build type
23 set(CMAKE_BUILD_TYPE Debug)
24
25 # compiler: add definitions and arguments to the compiler
26 add_definitions(
27     -Wall -Wextra -Weffc++ -Wshadow -Wcast-qual -Wconversion -pedantic
28     #-Werror
29     #-O2
30     -DVERSION_STRING=${VERSION}
31     -DPROJECT_NAME=\"${PROJECT_NAME}\"
32 )
33
34 # package: package information
35 set(CPACK_PACKAGE_VERSION ${VERSION})
36 set(CPACK_PACKAGE_CONTACT "Intra2net AG")
37 set(CPACK_PACKAGE_DESCRIPTION ${TARGET})
38 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Pingcheck")
39 set(CPACK_SOURCE_GENERATOR TGZ)
40 set(CPACK_SOURCE_IGNORE_FILES "\\\\.git;build;build-rpm")
41 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${TARGET}-${VERSION}")
42
43 # build the application in the source directory
44 add_subdirectory(src)
45
46 # package: ???
47 include(CPack)