diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-11-22 21:08:16 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-11-22 21:08:16 (GMT) |
commit | 76724c23bff8b5adcded34f73a4d18123b8b1fe8 (patch) | |
tree | da99edd1c3fd1e6f32a810e710a58aa8a5259056 /Source/cmOrderLinkDirectories.cxx | |
parent | 9312deb035f6974460323756c370dbd56662f736 (diff) | |
download | CMake-76724c23bff8b5adcded34f73a4d18123b8b1fe8.zip CMake-76724c23bff8b5adcded34f73a4d18123b8b1fe8.tar.gz CMake-76724c23bff8b5adcded34f73a4d18123b8b1fe8.tar.bz2 |
BUG: fix for bug 2357, do not allow targets to link to directories
Diffstat (limited to 'Source/cmOrderLinkDirectories.cxx')
-rw-r--r-- | Source/cmOrderLinkDirectories.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmOrderLinkDirectories.cxx b/Source/cmOrderLinkDirectories.cxx index 446b3ed..b0e0d6b 100644 --- a/Source/cmOrderLinkDirectories.cxx +++ b/Source/cmOrderLinkDirectories.cxx @@ -225,6 +225,7 @@ void cmOrderLinkDirectories::SetLinkInformation(cmTarget& target, linktype, const char* targetLibrary) { + m_TargetName = target.GetName(); // collect the search paths from the target into paths set const std::vector<std::string>& searchPaths = target.GetLinkDirectories(); std::vector<cmStdString> empty; @@ -279,6 +280,16 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder() std::vector<cmStdString> empty; for(unsigned int i=0; i < m_RawLinkItems.size(); ++i) { + if(cmSystemTools::FileIsDirectory(m_RawLinkItems[i].c_str())) + { + std::string message = "Warning: Ignoring path found in link libraries for target: "; + message += m_TargetName; + message += ", path is: "; + message += m_RawLinkItems[i]; + message += ". Expected a library name or a full path to a library name."; + cmSystemTools::Message(message.c_str()); + continue; + } if(cmSystemTools::FileIsFullPath(m_RawLinkItems[i].c_str())) { cmSystemTools::SplitProgramPath(m_RawLinkItems[i].c_str(), |