summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-11-29 20:58:19 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-11-29 20:58:19 (GMT)
commit46f8ed064820ec7a9d645a55a1ad7a0d3d7b8134 (patch)
tree94726fec6aee4edd9144b7f399ecc79b83450e14 /Source
parentd6219588c049c8d7ca1b328d918e410e9385f0c8 (diff)
downloadCMake-46f8ed064820ec7a9d645a55a1ad7a0d3d7b8134.zip
CMake-46f8ed064820ec7a9d645a55a1ad7a0d3d7b8134.tar.gz
CMake-46f8ed064820ec7a9d645a55a1ad7a0d3d7b8134.tar.bz2
BUG: fix a problem where it tried to link .dll.lib files
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt12
-rw-r--r--Source/cmOrderLinkDirectories.cxx9
2 files changed, 19 insertions, 2 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 63db833..e53aca1 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -403,6 +403,18 @@ IF(BUILD_TESTING)
${CMake_SOURCE_DIR}/Tests/TargetName/scripts/hello_world
${CMake_BINARY_DIR}/Tests/TargetName/scripts/hello_world)
+ ADD_TEST(LibName ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/LibName"
+ "${CMake_BINARY_DIR}/Tests/LibName"
+ --build-two-config
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-project LibName
+ --build-run-dir "${CMake_BINARY_DIR}/Tests/LibName/lib"
+ --test-command foobar
+ )
+
ADD_TEST(CustomCommand ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/CustomCommand"
diff --git a/Source/cmOrderLinkDirectories.cxx b/Source/cmOrderLinkDirectories.cxx
index fb25711..c04400b 100644
--- a/Source/cmOrderLinkDirectories.cxx
+++ b/Source/cmOrderLinkDirectories.cxx
@@ -463,7 +463,10 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
#ifdef CM_ORDER_LINK_DIRECTORIES_DEBUG
fprintf(stderr, "Raw link item [%s]\n", this->RawLinkItems[i].c_str());
#endif
- if(cmSystemTools::FileIsFullPath(this->RawLinkItems[i].c_str()))
+ // check to see if the file is a full path or just contains
+ // a / in it and is a path to something
+ if(cmSystemTools::FileIsFullPath(this->RawLinkItems[i].c_str())
+ || this->RawLinkItems[i].find("/") != cmStdString.npos)
{
if(cmSystemTools::FileIsDirectory(this->RawLinkItems[i].c_str()))
{
@@ -486,6 +489,8 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
}
else
{
+ // A full path to a directory was found as a link item
+ // warn user
std::string message =
"Warning: Ignoring path found in link libraries for target: ";
message += this->TargetName;
@@ -496,7 +501,7 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
cmSystemTools::Message(message.c_str());
continue;
}
- }
+ } // is it a directory
if(!framework)
{
dir = cmSystemTools::GetFilenamePath(this->RawLinkItems[i]);