diff options
author | Justin Goshi <jgoshi@microsoft.com> | 2017-11-15 23:10:24 (GMT) |
---|---|---|
committer | Justin Goshi <jgoshi@microsoft.com> | 2017-11-16 17:03:08 (GMT) |
commit | cb7d0a80faadb507f1bdd46f0e5991648c8a492a (patch) | |
tree | d83f7799ae06770f45def99e67dd1f3a9c4d7243 /Source | |
parent | d23a0c4d0e35d50f8f3f1a950a68df576294a77a (diff) | |
download | CMake-cb7d0a80faadb507f1bdd46f0e5991648c8a492a.zip CMake-cb7d0a80faadb507f1bdd46f0e5991648c8a492a.tar.gz CMake-cb7d0a80faadb507f1bdd46f0e5991648c8a492a.tar.bz2 |
server: project has install rule bug fix
Need to check all generators associated with the project because any of
them may have an install rule.
Diffstat (limited to 'Source')
-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); } |