diff options
author | Brad King <brad.king@kitware.com> | 2017-11-20 14:41:50 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-11-20 14:42:06 (GMT) |
commit | b0c2cd47f0b62f3586e3f45ed554357ac27dd576 (patch) | |
tree | eff465cad0ac8c02b4f6de78ce462ebd9226548b | |
parent | 521cb89e0254323bf29395ce6bdefd6a112a009d (diff) | |
parent | cb7d0a80faadb507f1bdd46f0e5991648c8a492a (diff) | |
download | CMake-b0c2cd47f0b62f3586e3f45ed554357ac27dd576.zip CMake-b0c2cd47f0b62f3586e3f45ed554357ac27dd576.tar.gz CMake-b0c2cd47f0b62f3586e3f45ed554357ac27dd576.tar.bz2 |
Merge topic 'serverBugFixHasInstallRule'
cb7d0a80 server: project has install rule bug fix
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1489
-rw-r--r-- | Source/cmServerProtocol.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 07df488..aae0a9d 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -1118,11 +1118,24 @@ static Json::Value DumpProjectList(const cmake* cm, std::string const& config) 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(); pObj[kTARGETS_KEY] = DumpTargetsList(projectIt.second, config); + // For a project-level install rule it might be defined in any of its + // associated generators. + bool hasInstallRule = false; + for (const auto generator : projectIt.second) { + hasInstallRule = + generator->GetMakefile()->GetInstallGenerators().empty() == false; + + if (hasInstallRule) { + break; + } + } + + pObj[kHAS_INSTALL_RULE] = hasInstallRule; + result.append(pObj); } |