From 6931e3d69fb36e6eae099585646e54ac644bf99c Mon Sep 17 00:00:00 2001 From: bibermann Date: Thu, 11 Jul 2019 11:40:02 +0200 Subject: [PATCH] Add option to disable building tests (#41) --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0dfd52d..ac58be0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,10 @@ cmake_minimum_required(VERSION 3.1) project(subprocess CXX) set(CMAKE_CXX_STANDARD 11) -enable_testing() -add_subdirectory(test) + +include(CTest) +if(BUILD_TESTING) + add_subdirectory(test) +endif() install(FILES subprocess.hpp DESTINATION include/subprocess/)