summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-08-20 18:56:42 +0200
committerljfa-ag <ljfa-ag@web.de>2015-08-20 18:56:42 +0200
commit8c7be11e9557f06bfcc6d5ebfe5d046fa218e149 (patch)
treed9b7e45edaad9886249a8ee60dd34c5ff28b4dea
parent5e057e152e214d7c92a03192e6c3a235df5961ea (diff)
downloadProject-Tick-8c7be11e9557f06bfcc6d5ebfe5d046fa218e149.tar.gz
Project-Tick-8c7be11e9557f06bfcc6d5ebfe5d046fa218e149.zip
Make building tests optional
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9fdebbcf9..99b5e44971 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.0)
project(libnbt++
VERSION 2.1)
+option(NBT_BUILD_TESTS "Build the unit tests" ON)
+
add_definitions(-std=c++11)
include_directories(include)
add_library(nbt++ STATIC
@@ -19,5 +21,7 @@ add_library(nbt++ STATIC
src/text/json_formatter.cpp)
-enable_testing()
-add_subdirectory(test)
+if(NBT_BUILD_TESTS)
+ enable_testing()
+ add_subdirectory(test)
+endif()