Add CMake flag for disabling the unit tests

fixes #10660
This commit is contained in:
Michael Friedrich 2015-11-25 15:24:04 +01:00
parent f91edd9564
commit 81c3b4d1d4
2 changed files with 7 additions and 1 deletions

View File

@ -38,6 +38,7 @@ option(ICINGA2_WITH_LIVESTATUS "Build the Livestatus module" ON)
option(ICINGA2_WITH_NOTIFICATION "Build the notification module" ON) option(ICINGA2_WITH_NOTIFICATION "Build the notification module" ON)
option(ICINGA2_WITH_PERFDATA "Build the perfdata module" ON) option(ICINGA2_WITH_PERFDATA "Build the perfdata module" ON)
option(ICINGA2_WITH_STUDIO "Build the Icinga Studio application" OFF) option(ICINGA2_WITH_STUDIO "Build the Icinga Studio application" OFF)
option(ICINGA2_WITH_TESTS "Run unit tests" ON)
file(STRINGS icinga2.spec VERSION_LINE REGEX "^Version: ") file(STRINGS icinga2.spec VERSION_LINE REGEX "^Version: ")
string(REPLACE "Version: " "" ICINGA2_VERSION ${VERSION_LINE}) string(REPLACE "Version: " "" ICINGA2_VERSION ${VERSION_LINE})
@ -241,7 +242,6 @@ add_subdirectory(icinga-app)
add_subdirectory(etc) add_subdirectory(etc)
add_subdirectory(itl) add_subdirectory(itl)
add_subdirectory(doc) add_subdirectory(doc)
add_subdirectory(test)
add_subdirectory(agent) add_subdirectory(agent)
add_subdirectory(plugins) add_subdirectory(plugins)
@ -249,6 +249,10 @@ if(ICINGA2_WITH_STUDIO)
add_subdirectory(icinga-studio) add_subdirectory(icinga-studio)
endif() endif()
if(ICINGA2_WITH_TESTS)
add_subdirectory(test)
endif()
set(CPACK_PACKAGE_NAME "Icinga2") set(CPACK_PACKAGE_NAME "Icinga2")
set(CPACK_PACKAGE_VENDOR "Icinga Development Team") set(CPACK_PACKAGE_VENDOR "Icinga Development Team")
set(CPACK_PACKAGE_VERSION ${ICINGA2_VERSION}) set(CPACK_PACKAGE_VERSION ${ICINGA2_VERSION})

View File

@ -107,6 +107,8 @@ Defaults to `OFF`.
- `ICINGA2_WITH_LIVESTATUS`: Determines whether the Livestatus module is built; defaults to `ON` - `ICINGA2_WITH_LIVESTATUS`: Determines whether the Livestatus module is built; defaults to `ON`
- `ICINGA2_WITH_NOTIFICATION`: Determines whether the notification module is built; defaults to `ON` - `ICINGA2_WITH_NOTIFICATION`: Determines whether the notification module is built; defaults to `ON`
- `ICINGA2_WITH_PERFDATA`: Determines whether the perfdata module is built; defaults to `ON` - `ICINGA2_WITH_PERFDATA`: Determines whether the perfdata module is built; defaults to `ON`
- `ICINGA2_WITH_STUDIO`: Determines whether the Icinga Studio application is built; defaults to `OFF`
- `ICINGA2_WITH_TESTS`: Determines whether the unit tests are built; defaults to `ON`
CMake determines the Icinga 2 version number using `git describe` if the CMake determines the Icinga 2 version number using `git describe` if the
source directory is contained in a Git repository. Otherwise the version number source directory is contained in a Git repository. Otherwise the version number