summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-11-30 15:12:56 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-11-30 15:12:56 (GMT)
commit3dca9a681f247c3b5b51ef43833e3ed9529a3943 (patch)
treefb5b1544eac9db38eecb9c680aad6e135aa78194 /Source
parent04280871698816e504320fea3e76a7add612ba31 (diff)
downloadCMake-3dca9a681f247c3b5b51ef43833e3ed9529a3943.zip
CMake-3dca9a681f247c3b5b51ef43833e3ed9529a3943.tar.gz
CMake-3dca9a681f247c3b5b51ef43833e3ed9529a3943.tar.bz2
ENH: put fix for foo.dll.lib problem on branch with test
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt11
-rw-r--r--Source/cmOrderLinkDirectories.cxx10
2 files changed, 19 insertions, 2 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 10c3237..694ba9d 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -402,6 +402,17 @@ IF(BUILD_TESTING)
--test-command ${CMAKE_CMAKE_COMMAND} -E compare_files
${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-exe-dir "${CMake_BINARY_DIR}/Tests/LibName/lib"
+ --test-command foobar
+ )
ADD_TEST(CustomCommand ${CMAKE_CTEST_COMMAND}
--build-and-test
diff --git a/Source/cmOrderLinkDirectories.cxx b/Source/cmOrderLinkDirectories.cxx
index bd07f8a..2779f42 100644
--- a/Source/cmOrderLinkDirectories.cxx
+++ b/Source/cmOrderLinkDirectories.cxx
@@ -463,7 +463,11 @@ 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
+ cmStdString& item = this->RawLinkItems[i];
+ if(cmSystemTools::FileIsFullPath(item.c_str())
+ || item.find("/") != item.npos)
{
if(cmSystemTools::FileIsDirectory(this->RawLinkItems[i].c_str()))
{
@@ -486,6 +490,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 +502,7 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
cmSystemTools::Message(message.c_str());
continue;
}
- }
+ } // is it a directory
if(!framework)
{
dir = cmSystemTools::GetFilenamePath(this->RawLinkItems[i]);