Install: Move SetHaveInstallRule to a more-obvious place

The moved-from location checks for the existence of whether certain
generators are needed for any target in a loop, rather than whether
the current target has an install rule.

This was introduced in commit v3.4.0-rc1~275^2~3 (cmInstallCommand: Move
the SetHaveInstallRule invocation., 2015-07-28).  Move the
SetHaveInstallRule call to a more-obvious place where the
cmInstallTargetGenerator is constructed.
This commit is contained in:
Stephen Kelly 2015-11-08 13:41:33 +01:00
parent bc4b6aa68d
commit 9103d8ace3
1 changed files with 1 additions and 6 deletions

View File

@ -27,6 +27,7 @@ static cmInstallTargetGenerator* CreateInstallTargetGenerator(cmTarget& target,
{
cmInstallGenerator::MessageLevel message =
cmInstallGenerator::SelectMessageLevel(target.GetMakefile());
target.SetHaveInstallRule(true);
return new cmInstallTargetGenerator(target.GetName(),
args.GetDestination().c_str(),
impLib, args.GetPermissions().c_str(),
@ -753,12 +754,6 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
installsPublicHeader = installsPublicHeader || publicHeaderGenerator != 0;
installsResource = installsResource || resourceGenerator;
if (installsArchive || installsRuntime || installsFramework
|| installsLibrary || installsBundle)
{
target.SetHaveInstallRule(true);
}
this->Makefile->AddInstallGenerator(archiveGenerator);
this->Makefile->AddInstallGenerator(libraryGenerator);
this->Makefile->AddInstallGenerator(runtimeGenerator);