Merge topic 'cmakeServerRequiredCMakeVersion'

cdf5f34b server: return minimum cmake required version for each project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1462
This commit is contained in:
Brad King
2017-11-10 12:51:04 +00:00
committed by Kitware Robot
3 changed files with 6 additions and 0 deletions
+3
View File
@@ -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"
+1
View File
@@ -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";
+2
View File
@@ -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();