summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-10 12:51:04 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-11-10 12:51:13 (GMT)
commit38bb98de511e41ae48c6c5193cc0333d54033365 (patch)
tree4187b889dee53a8b701a0b578edab54763738268
parent78def0e25749249b500e8093e34df46217c526ef (diff)
parentcdf5f34b0c2ce8b984721f13a4dcd598a3d593e3 (diff)
downloadCMake-38bb98de511e41ae48c6c5193cc0333d54033365.zip
CMake-38bb98de511e41ae48c6c5193cc0333d54033365.tar.gz
CMake-38bb98de511e41ae48c6c5193cc0333d54033365.tar.bz2
Merge topic 'cmakeServerRequiredCMakeVersion'
cdf5f34b server: return minimum cmake required version for each project Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1462
-rw-r--r--Help/manual/cmake-server.7.rst3
-rw-r--r--Source/cmServerDictionary.h1
-rw-r--r--Source/cmServerProtocol.cxx2
3 files changed, 6 insertions, 0 deletions
diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst
index a2fd961..ee8fada 100644
--- a/Help/manual/cmake-server.7.rst
+++ b/Help/manual/cmake-server.7.rst
@@ -458,6 +458,9 @@ Each project object can have the following keys:
"name"
contains the (sub-)projects name.
+"minimumCMakeVersion"
+ contains the minimum cmake version allowed for this project, null if the
+ project doesn't specify one.
"hasInstallRule"
true if the project contains any install rules, false otherwise.
"sourceDirectory"
diff --git a/Source/cmServerDictionary.h b/Source/cmServerDictionary.h
index 040c1fd..8cd5e14 100644
--- a/Source/cmServerDictionary.h
+++ b/Source/cmServerDictionary.h
@@ -95,6 +95,7 @@ static const std::string kHAS_ENABLED_TESTS = "hasEnabledTests";
static const std::string kCTEST_NAME = "ctestName";
static const std::string kCTEST_COMMAND = "ctestCommand";
static const std::string kCTEST_INFO = "ctestInfo";
+static const std::string kMINIMUM_CMAKE_VERSION = "minimumCMakeVersion";
static const std::string kTARGET_CROSS_REFERENCES_KEY = "crossReferences";
static const std::string kLINE_NUMBER_KEY = "line";
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index 0cb906b..07df488 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -1116,6 +1116,8 @@ static Json::Value DumpProjectList(const cmake* cm, std::string const& config)
// Project structure information:
const cmMakefile* mf = lg->GetMakefile();
+ pObj[kMINIMUM_CMAKE_VERSION] =
+ mf->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
pObj[kHAS_INSTALL_RULE] = mf->GetInstallGenerators().empty() == false;
pObj[kSOURCE_DIRECTORY_KEY] = mf->GetCurrentSourceDirectory();
pObj[kBUILD_DIRECTORY_KEY] = mf->GetCurrentBinaryDirectory();