From 752804372c404003dabc81645a8528d644217837 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 b15f779..3fc29cb 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 @@ -349,8 +350,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()