diff options
author | Brad King <brad.king@kitware.com> | 2016-02-09 15:10:09 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-02-09 15:10:09 (GMT) |
commit | e509c0e6d47510940d4282bf46b583ac15ab033d (patch) | |
tree | 9ace27601218f8fcb342d06686b99f23f709ef1f /Source | |
parent | 41c38ee7cdd32b15b51dc44cdb97fd44f9831c40 (diff) | |
parent | a1ad098dc8fc5204fc797b92faed517337816b82 (diff) | |
download | CMake-e509c0e6d47510940d4282bf46b583ac15ab033d.zip CMake-e509c0e6d47510940d4282bf46b583ac15ab033d.tar.gz CMake-e509c0e6d47510940d4282bf46b583ac15ab033d.tar.bz2 |
Merge topic 'fix-install-EXPORT-crash'
a1ad098d Tests: Avoid OS X 10.5 limitation warning in RunCMake.install test
47460f3e install(EXPORT): Fix crash on target in another directory
e86383e1 Tests: Use newer policy settings in RunCMake.install test
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmInstallCommand.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 15a83ee..2d78a41 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -1374,10 +1374,12 @@ 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); + cmTarget* tgt = + this->Makefile->GetGlobalGenerator()->FindTarget(te->TargetName); const bool newCMP0022Behavior = - tgt->GetPolicyStatusCMP0022() != cmPolicies::WARN - && tgt->GetPolicyStatusCMP0022() != cmPolicies::OLD; + (tgt && + tgt->GetPolicyStatusCMP0022() != cmPolicies::WARN && + tgt->GetPolicyStatusCMP0022() != cmPolicies::OLD); if(!newCMP0022Behavior) { |