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 /Source/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 'Source/CMakeLists.txt')
-rw-r--r-- | Source/CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 39773e1..a2dead6 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -786,6 +786,17 @@ add_executable(cmake cmakemain.cxx cmcmd.cxx cmcmd.h ${MANIFEST_FILE}) list(APPEND _tools cmake) target_link_libraries(cmake CMakeLib) +if(CMake_HAVE_SERVER_MODE) + add_library(CMakeServerLib + cmServer.cxx cmServer.h + cmServerProtocol.cxx cmServerProtocol.h + ) + target_link_libraries(CMakeServerLib CMakeLib) + set_property(SOURCE cmcmd.cxx APPEND PROPERTY COMPILE_DEFINITIONS HAVE_SERVER_MODE=1) + + target_link_libraries(cmake CMakeServerLib) +endif() + # Build CTest executable add_executable(ctest ctest.cxx ${MANIFEST_FILE}) list(APPEND _tools ctest) |