summaryrefslogtreecommitdiff
path: root/Source/cmInstallCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-17 13:31:33 +0200
committerStephen Kelly <steveire@gmail.com>2015-10-18 16:29:29 +0200
commit381e7afd363d64c72b83e69fd6c6cad5fc3eefb4 (patch)
tree4622b0de4d39a55ec71ca7562f18783137da3087 /Source/cmInstallCommand.cxx
parent65911cae4dd5a81f23a59bf9187b95bda3168fe9 (diff)
downloadcmake-381e7afd363d64c72b83e69fd6c6cad5fc3eefb4.tar.gz
cmExportSet: Store a cmGeneratorTarget.
Set the member at compute time from the stored name.
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r--Source/cmInstallCommand.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index c22edf3365..6b06fce2a6 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -773,7 +773,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
if(!exports.GetString().empty() && !namelinkOnly)
{
cmTargetExport *te = new cmTargetExport;
- te->Target = &target;
+ te->TargetName = target.GetName();
te->ArchiveGenerator = archiveGenerator;
te->BundleGenerator = bundleGenerator;
te->FrameworkGenerator = frameworkGenerator;
@@ -1379,16 +1379,17 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
tei != exportSet->GetTargetExports()->end(); ++tei)
{
cmTargetExport const* te = *tei;
+ cmTarget* tgt = this->Makefile->FindTarget(te->TargetName);
const bool newCMP0022Behavior =
- te->Target->GetPolicyStatusCMP0022() != cmPolicies::WARN
- && te->Target->GetPolicyStatusCMP0022() != cmPolicies::OLD;
+ tgt->GetPolicyStatusCMP0022() != cmPolicies::WARN
+ && tgt->GetPolicyStatusCMP0022() != cmPolicies::OLD;
if(!newCMP0022Behavior)
{
std::ostringstream e;
e << "INSTALL(EXPORT) given keyword \""
<< "EXPORT_LINK_INTERFACE_LIBRARIES" << "\", but target \""
- << te->Target->GetName()
+ << te->TargetName
<< "\" does not have policy CMP0022 set to NEW.";
this->SetError(e.str());
return false;