From 523f8ec82c5fb62f5f67c962ff59886396abd8fd Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 29 Sep 2016 13:40:21 -0400 Subject: server-mode: Add option to enable/disable test case explicitly Add a `CMake_TEST_SERVER_MODE` option that can be set in testing builds to enable/disable server mode tests explicitly. This will allow testing in combination with `CMake_TEST_EXTERNAL_CMAKE` or for server mode to be built on systems that have a python version that cannot run the test. --- CMakeLists.txt | 3 +++ Tests/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f39ddf3..309e224 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -715,6 +715,9 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE) else() set(CMake_ENABLE_SERVER_MODE 0) endif() +if(NOT DEFINED CMake_TEST_SERVER_MODE) + set(CMake_TEST_SERVER_MODE ${CMake_ENABLE_SERVER_MODE}) +endif() if(NOT CMake_TEST_EXTERNAL_CMAKE) if(NOT CMake_VERSION_IS_RELEASE) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 484ea8a..31ed2eb 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2723,7 +2723,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ADD_TEST_MACRO(CMakeCommands.target_compile_definitions target_compile_definitions) ADD_TEST_MACRO(CMakeCommands.target_compile_options target_compile_options) - if(CMake_ENABLE_SERVER_MODE) + if(CMake_TEST_SERVER_MODE) # The cmake server-mode test requires python for a simple client. find_package(PythonInterp QUIET) if(PYTHON_EXECUTABLE) -- cgit v0.12