From 29f3c075393f2936598b66ca2c164de407ff97ef Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Sun, 14 Feb 2016 16:25:21 +0100 Subject: [PATCH] Don't build test cases by default. Only build them, when -DBUILD_TESTING=on is specified. --- CMakeLists.txt | 5 +++++ README.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23c24525..c5fa0e6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,11 @@ include(utils.cmake) require_gcc_version(4.8) require_clang_version(3.5) # clang 3.5 needed for spdlog dependency +# Default value is not to build test cases +if(NOT DEFINED BUILD_TESTING) + set(BUILD_TESTING OFF CACHE INTERNAL "BUILD_TESTING") +endif(NOT DEFINED BUILD_TESTING) + add_subdirectory(vendor) add_subdirectory(src) add_subdirectory(test) diff --git a/README.md b/README.md index 21e4ca6f..4527dda5 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Build & Install 2. Build $ mkdir cmake && cd cmake - $ cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=off + $ cmake .. -DCMAKE_BUILD_TYPE=Release $ make 3. Install