From cffb98d15bd18a69e5696ba3dab42cfbfbac1984 Mon Sep 17 00:00:00 2001 From: Jesse Beder Date: Mon, 12 Oct 2009 05:21:00 +0000 Subject: [PATCH] Patched for optional building of tests and tools --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d64b6f..7ed2297 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,8 @@ set(YAML_CPP_VERSION "${YAML_CPP_VERSION_MAJOR}.${YAML_CPP_VERSION_MINOR}.${YAML enable_testing() +option(YAML_CPP_BUILD_TOOLS "Enables or disables yaml-reader and parse tools" true) + if(WIN32) set(_library_dir bin) # .dll are in PATH, like executables else(WIN32) @@ -64,5 +66,7 @@ if(UNIX) install(FILES ${PC_FILE} DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) endif(UNIX) -add_subdirectory (yaml-reader) -add_subdirectory (util) +if(YAML_CPP_BUILD_TOOLS) + add_subdirectory (yaml-reader) + add_subdirectory (util) +endif(YAML_CPP_BUILD_TOOLS)