Skip to content

Commit

Permalink
server-mode: Add option to enable/disable test case explicitly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bradking committed Sep 29, 2016
1 parent 6b97a5e commit 523f8ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Tests/CMakeLists.txt
Expand Up @@ -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)
Expand Down

0 comments on commit 523f8ec

Please sign in to comment.