summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2017-08-25 20:07:43 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2017-08-26 05:46:58 (GMT)
commit7f29bbe6f25211165fc188d3a823ecf3bc831f8d (patch)
treeb05f0d1aecdd5fa19f9437081509a1a49d6eec76 /Source
parent4614a3b287456fad12bcb91ad2936214da3237bf (diff)
downloadCMake-7f29bbe6f25211165fc188d3a823ecf3bc831f8d.zip
CMake-7f29bbe6f25211165fc188d3a823ecf3bc831f8d.tar.gz
CMake-7f29bbe6f25211165fc188d3a823ecf3bc831f8d.tar.bz2
server: always enable server
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt24
-rw-r--r--Source/cmcmd.cxx11
2 files changed, 14 insertions, 21 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index d35b7fb..bcc3437 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -1010,20 +1010,16 @@ add_executable(cmake cmakemain.cxx cmcmd.cxx cmcmd.h ${MANIFEST_FILE})
list(APPEND _tools cmake)
target_link_libraries(cmake CMakeLib)
-if(CMake_ENABLE_SERVER_MODE)
- add_library(CMakeServerLib
- cmConnection.h cmConnection.cxx
- cmFileMonitor.cxx cmFileMonitor.h
- cmPipeConnection.cxx cmPipeConnection.h
- cmServer.cxx cmServer.h
- cmServerConnection.cxx cmServerConnection.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()
+add_library(CMakeServerLib
+ cmConnection.h cmConnection.cxx
+ cmFileMonitor.cxx cmFileMonitor.h
+ cmPipeConnection.cxx cmPipeConnection.h
+ cmServer.cxx cmServer.h
+ cmServerConnection.cxx cmServerConnection.h
+ cmServerProtocol.cxx cmServerProtocol.h
+ )
+target_link_libraries(CMakeServerLib CMakeLib)
+target_link_libraries(cmake CMakeServerLib)
# Build CTest executable
add_executable(ctest ctest.cxx ${MANIFEST_FILE})
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 6b9a4a4..830a05c 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -15,13 +15,10 @@
#include "cm_auto_ptr.hxx"
#include "cmake.h"
-#if defined(HAVE_SERVER_MODE) && HAVE_SERVER_MODE
-#include "cmServer.h"
-#include "cmServerConnection.h"
-#endif
-
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmDependsFortran.h" // For -E cmake_copy_f90_mod callback.
+#include "cmServer.h"
+#include "cmServerConnection.h"
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32)
@@ -591,7 +588,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
return 1;
}
cmake cm(cmake::RoleInternal);
-#if defined(HAVE_SERVER_MODE) && HAVE_SERVER_MODE
+#if defined(CMAKE_BUILD_WITH_CMAKE)
std::cout << cm.ReportCapabilities(true);
#else
std::cout << cm.ReportCapabilities(false);
@@ -1023,7 +1020,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
return 1;
}
}
-#if defined(HAVE_SERVER_MODE) && HAVE_SERVER_MODE
+#if defined(CMAKE_BUILD_WITH_CMAKE)
cmConnection* conn;
if (isDebug) {
conn = new cmServerStdIoConnection;