aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-04-18 00:31:10 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-17 15:24:51 -0700
commit1c71a908267a01a590de5975a7c46d25aeca7efb (patch)
treea9dc56949866997173277d98113b88d1ad37c543 /CMakeLists.txt
parent6662f2864fe58bec01a9f4480d39c8bb710c564b (diff)
downloadsubsurface-1c71a908267a01a590de5975a7c46d25aeca7efb.tar.gz
cmake: add the NO_TESTS NO_DOCS options
NO_TESTS: disable the tests NO_DOCS: disable the docs Both are set to OFF by default. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 11 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 93b0bdf42..761c439af 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,8 @@ cmake_minimum_required(VERSION 2.8.11)
SET(CMAKE_AUTOMOC ON)
SET(CMAKE_AUTOUIC ON)
OPTION(PREFER_GIT_FROMSOURCE "Turn off if you wanna use system's libgit 0.21.5" ON)
+OPTION(NO_TESTS "disable the tests" OFF)
+OPTION(NO_DOCS "disable the docs" OFF)
SET(CMAKE_MODULE_PATH ${${PROJECT_NAME}_SOURCE_DIR}/cmake/Modules)
INCLUDE_DIRECTORIES( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} qt-ui qt-ui/profile)
@@ -339,12 +341,16 @@ ENDMACRO()
ENABLE_TESTING()
ADD_DEFINITIONS(-DSUBSURFACE_SOURCE="${CMAKE_SOURCE_DIR}")
ADD_DEFINITIONS(-g)
-test(TestUnitConversion testunitconversion.cpp)
-test(TestProfile testprofile.cpp)
-test(TestGpsCoords testgpscoords.cpp)
-test(TestParse testparse.cpp)
+IF(NOT NO_TESTS)
+ test(TestUnitConversion testunitconversion.cpp)
+ test(TestProfile testprofile.cpp)
+ test(TestGpsCoords testgpscoords.cpp)
+ test(TestParse testparse.cpp)
+ENDIF()
-ADD_CUSTOM_TARGET(documentation ALL mkdir -p ${CMAKE_BINARY_DIR}/Documentation/ \\; make -C ${CMAKE_SOURCE_DIR}/Documentation OUT=${CMAKE_BINARY_DIR}/Documentation/ doc)
+IF(NOT NO_DOCS)
+ ADD_CUSTOM_TARGET(documentation ALL mkdir -p ${CMAKE_BINARY_DIR}/Documentation/ \\; make -C ${CMAKE_SOURCE_DIR}/Documentation OUT=${CMAKE_BINARY_DIR}/Documentation/ doc)
+ENDIF()
# install Subsurface
# first some variables with files that need installing