diff options
author | Brad King <brad.king@kitware.com> | 2008-03-31 16:47:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-03-31 16:47:31 (GMT) |
commit | 3652a8e913eab6befcbdc74cbd985763ed27db33 (patch) | |
tree | 6d65bb6736f40617112f3d38fb78c9fa4fae11b7 /Source/cmComputeLinkInformation.cxx | |
parent | 8605551920bd0a904c146173d46fafbc2bba0b2b (diff) | |
download | CMake-3652a8e913eab6befcbdc74cbd985763ed27db33.zip CMake-3652a8e913eab6befcbdc74cbd985763ed27db33.tar.gz CMake-3652a8e913eab6befcbdc74cbd985763ed27db33.tar.bz2 |
BUG: Fix bug 6605 more completely
- CMake 2.4 added link directories for targets linked
in the optimized configuration even when building debug
- Old behavior for policy CMP0003 must account for this
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 82db1d3..fc9bf47 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -510,6 +510,7 @@ bool cmComputeLinkInformation::Compute() // Compute the ordered link line items. cmComputeLinkDepends cld(this->Target, this->Config); + cld.SetOldLinkDirMode(this->OldLinkDirMode); cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute(); // Add the link line items. @@ -539,6 +540,25 @@ bool cmComputeLinkInformation::Compute() this->SetCurrentLinkType(this->StartLinkType); } + // Finish listing compatibility paths. + if(this->OldLinkDirMode) + { + // For CMake 2.4 bug-compatibility we need to consider the output + // directories of targets linked in another configuration as link + // directories. + std::set<cmTarget*> const& wrongItems = cld.GetOldWrongConfigItems(); + for(std::set<cmTarget*>::const_iterator i = wrongItems.begin(); + i != wrongItems.end(); ++i) + { + cmTarget* tgt = *i; + bool implib = + (this->UseImportLibrary && + (tgt->GetType() == cmTarget::SHARED_LIBRARY)); + std::string lib = tgt->GetFullPath(this->Config , implib, true); + this->OldLinkDirItems.push_back(lib); + } + } + // Finish setting up linker search directories. if(!this->FinishLinkerSearchDirectories()) { |