diff options
author | Brad King <brad.king@kitware.com> | 2016-09-19 13:36:34 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-09-19 13:36:34 (GMT) |
commit | 5c87b92b1b7888ee032e3c2a75f35f1f94f4dfa5 (patch) | |
tree | ab19ef186570cb3637eab19d19bef17207a1b748 /Source/cmake.cxx | |
parent | 419ad0510193eb2b2e227095a4dd167cd9b3df80 (diff) | |
parent | 7263667c24cecf4bb155fc0cbf687dee8b57f5f7 (diff) | |
download | CMake-5c87b92b1b7888ee032e3c2a75f35f1f94f4dfa5.zip CMake-5c87b92b1b7888ee032e3c2a75f35f1f94f4dfa5.tar.gz CMake-5c87b92b1b7888ee032e3c2a75f35f1f94f4dfa5.tar.bz2 |
Merge topic 'cmake-server-basic'
7263667c Help: Add notes for topic 'cmake-server-basic'
5adde4e7 cmake-server: Add documentation
b63c1f6c cmake-server: Add unit test
d341d077 cmake-server: Implement ServerProtocol 1.0
b13d3e0d cmake-server: Bare-bones server implementation
cd049f01 cmake-server: Report server mode availablitily in Capabilities
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 112a5f7..0c84283 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -234,7 +234,7 @@ cmake::~cmake() } #if defined(CMAKE_BUILD_WITH_CMAKE) -Json::Value cmake::ReportCapabilitiesJson() const +Json::Value cmake::ReportCapabilitiesJson(bool haveServerMode) const { Json::Value obj = Json::objectValue; // Version information: @@ -280,22 +280,18 @@ Json::Value cmake::ReportCapabilitiesJson() const generators.append(i->second); } obj["generators"] = generators; + obj["serverMode"] = haveServerMode; -#if defined(HAVE_SERVER_MODE) && HAVE_SERVER_MODE - obj["serverMode"] = true; -#else - obj["serverMode"] = false; -#endif return obj; } #endif -std::string cmake::ReportCapabilities() const +std::string cmake::ReportCapabilities(bool haveServerMode) const { std::string result; #if defined(CMAKE_BUILD_WITH_CMAKE) Json::FastWriter writer; - result = writer.write(this->ReportCapabilitiesJson()); + result = writer.write(this->ReportCapabilitiesJson(haveServerMode)); #else result = "Not supported"; #endif |