summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()