mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user