From d21d967fd5fb1a29eb1724cda1127d1c7b83e5f1 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Thu, 9 Nov 2017 15:30:25 -0500 Subject: [PATCH] Separate tests and tools Don't build tests if the confusingly named YAML_CPP_BUILD_TOOLS is ON. Instead, add a new option that controls only if the tests are built. (Also, default tests to OFF.) --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a082038..1bd8734 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,8 @@ enable_testing() ### Project options ### ## Project stuff -option(YAML_CPP_BUILD_TOOLS "Enable testing and parse tools" ON) +option(YAML_CPP_BUILD_TESTS "Enable testing" ON) +option(YAML_CPP_BUILD_TOOLS "Enable parse tools" ON) option(YAML_CPP_BUILD_CONTRIB "Enable contrib stuff in library" ON) ## Build options @@ -355,8 +356,10 @@ endif() ### ### Extras ### -if(YAML_CPP_BUILD_TOOLS) +if(YAML_CPP_BUILD_TESTS) add_subdirectory(test) +endif() +if(YAML_CPP_BUILD_TOOLS) add_subdirectory(util) endif()