* CMakeLists.txt: Add option SKIP_TESTS to disable building the test suite.


git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1834940 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 13162e5..5f50e53 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,6 @@
         "Serf's CMake build is considered EXPERIMENTAL. "
         "Some features are not supported and the build "
         "has not been tested on many supported platforms.")
-enable_testing()
 
 # Initialize the build type if it was not set on the command line.
 if(NOT CMAKE_BUILD_TYPE)
@@ -50,10 +49,11 @@
 option(ZLIB "Path to zlib's install area" OFF)
 option(GSSAPI "Path to GSSAPI's install area" OFF)
 option(BROTLI "Path to Brotli's install area" OFF)
-option(DISABLE_LOGGING "Disable the logging framework at compile time" OFF)
-option(ENABLE_SLOW_TESTS "Enable long-running unit tests" OFF)
 option(APR_STATIC "Windows: Link with static APR/-Util libraries" OFF)
 option(EXPAT "Windows: optional path to Expat's install area for APR_STATIC" OFF)
+option(DISABLE_LOGGING "Disable the logging framework at compile time" OFF)
+option(SKIP_TESTS "Disable building the unit tests and utilities" OFF)
+option(ENABLE_SLOW_TESTS "Enable long-running unit tests" OFF)
 
 
 # Public headers
@@ -323,5 +323,7 @@
   install(FILES "${CMAKE_BINARY_DIR}/serf.pc" DESTINATION "share/pkgconfig")
 endif()
 
-
-add_subdirectory(test)
+if(NOT SKIP_TESTS)
+  enable_testing()
+  add_subdirectory(test)
+endif()