diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2016-09-13 09:26:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-19 12:57:57 (GMT) |
commit | b13d3e0d0b3c644242ef8dc4977d35da73398a9d (patch) | |
tree | 76312d0c8123d1053d4f98cd3c81edf7f860198d /CMakeLists.txt | |
parent | cd049f012ef22f8f1214b35e351fda823d534b92 (diff) | |
download | CMake-b13d3e0d0b3c644242ef8dc4977d35da73398a9d.zip CMake-b13d3e0d0b3c644242ef8dc4977d35da73398a9d.tar.gz CMake-b13d3e0d0b3c644242ef8dc4977d35da73398a9d.tar.bz2 |
cmake-server: Bare-bones server implementation
Adds a bare-bones cmake-server implementation and makes it possible
to start that with "cmake -E server".
Communication happens via stdin/stdout for now.
Protocol is based on Json objects surrounded by magic strings
("[== CMake Server ==[" and "]== CMake Server ==]"), which simplifies
Json parsing significantly.
This patch also defines an interface used to implement different
versions of the protocol spoken by the server, but does not include
any protocol implementaiton.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c8bd063..2ec8b57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -702,6 +702,18 @@ endif() # setup some Testing support (a macro defined in this file) CMAKE_SETUP_TESTING() +# Check whether to build server mode or not: +set(CMake_HAVE_SERVER_MODE 0) +if(NOT CMake_TEST_EXTERNAL_CMAKE AND NOT CMAKE_BOOTSTRAP AND CMAKE_USE_LIBUV) + list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_auto_type CMake_HAVE_CXX_AUTO_TYPE) + list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_range_for CMake_HAVE_CXX_RANGE_FOR) + if(CMake_HAVE_CXX_AUTO_TYPE AND CMake_HAVE_CXX_RANGE_FOR) + if(CMake_HAVE_CXX_MAKE_UNIQUE) + set(CMake_HAVE_SERVER_MODE 1) + endif() + endif() +endif() + if(NOT CMake_TEST_EXTERNAL_CMAKE) if(NOT CMake_VERSION_IS_RELEASE) if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND |