From 9103d8ace327d34a6bc5085e0ec91abc6e8053f1 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 8 Nov 2015 13:41:33 +0100 Subject: [PATCH] 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. --- Source/cmInstallCommand.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 333c2ff17..d3c2e268c 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -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 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);