diff options
author | Brad King <brad.king@kitware.com> | 2020-10-15 12:31:37 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-15 12:31:47 (GMT) |
commit | 4f6fccd86174742c2f17aeba1a940be383a3c7df (patch) | |
tree | c77aebf861444595f51a1ab194a0cb1eb4c465a1 /Source/cmcmd.cxx | |
parent | 6f84cc7f8bf74528624979d9a3a7f63f7b43b0c4 (diff) | |
parent | 9952ee063a1a2b31c784733b0cf676b4a6efc36e (diff) | |
download | CMake-4f6fccd86174742c2f17aeba1a940be383a3c7df.zip CMake-4f6fccd86174742c2f17aeba1a940be383a3c7df.tar.gz CMake-4f6fccd86174742c2f17aeba1a940be383a3c7df.tar.bz2 |
Merge topic 'remove-server-mode'
9952ee063a server: remove deprecated 'cmake -E server' mode
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !5370
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 48 |
1 files changed, 2 insertions, 46 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 8db6ee8..ea1f968 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -29,8 +29,6 @@ #if !defined(CMAKE_BOOTSTRAP) # include "cmDependsFortran.h" // For -E cmake_copy_f90_mod callback. # include "cmFileTime.h" -# include "cmServer.h" -# include "cmServerConnection.h" # include "bindexplib.h" #endif @@ -62,8 +60,6 @@ #include "cmsys/Process.h" #include "cmsys/Terminal.h" -class cmConnection; - int cmcmd_cmake_ninja_depends(std::vector<std::string>::const_iterator argBeg, std::vector<std::string>::const_iterator argEnd); int cmcmd_cmake_ninja_dyndep(std::vector<std::string>::const_iterator argBeg, @@ -122,7 +118,6 @@ void CMakeCommandUsage(const char* program) "(on one volume)\n" << " rm [-rRf] <file/dir>... - remove files or directories, use -f to " "force it, r or R to remove directories and their contents recursively\n" - << " server - start cmake in server mode\n" << " sleep <number>... - sleep for given number of seconds\n" << " tar [cxt][vf][zjJ] file.tar [file/dir1 file/dir2 ...]\n" << " - create or extract a tar or zip archive\n" @@ -1360,47 +1355,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args, } if (args[1] == "server") { - const std::string pipePrefix = "--pipe="; - bool supportExperimental = false; - bool isDebug = false; - std::string pipe; - - for (auto const& arg : cmMakeRange(args).advance(2)) { - if (arg == "--experimental") { - supportExperimental = true; - } else if (arg == "--debug") { - pipe.clear(); - isDebug = true; - } else if (cmHasPrefix(arg, pipePrefix)) { - isDebug = false; - pipe = arg.substr(pipePrefix.size()); - if (pipe.empty()) { - cmSystemTools::Error("No pipe given after --pipe="); - return 2; - } - } else { - cmSystemTools::Error("Unknown argument for server mode"); - return 1; - } - } -#if !defined(CMAKE_BOOTSTRAP) - cmConnection* conn; - if (isDebug) { - conn = new cmServerStdIoConnection; - } else { - conn = new cmServerPipeConnection(pipe); - } - cmServer server(conn, supportExperimental); - std::string errorMessage; - if (server.Serve(&errorMessage)) { - return 0; - } - cmSystemTools::Error(errorMessage); -#else - static_cast<void>(supportExperimental); - static_cast<void>(isDebug); - cmSystemTools::Error("CMake was not built with server mode enabled"); -#endif + cmSystemTools::Error( + "CMake server mode has been removed in favor of the file-api."); return 1; } |