Commit 3dca9a68 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: put fix for foo.dll.lib problem on branch with test

parent 04280871
......@@ -7,7 +7,7 @@ SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 4)
SET(CMake_VERSION_PATCH 5)
# for an actual release this should not be defined
SET(CMake_VERSION_RC 1)
SET(CMake_VERSION_RC 2)
SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
......
Changes in CMake 2.4.5
* Fix problem with LIBRARY_OUTPUT_PATH and linking to a dll foo.dll.lib
instead of foo.lib
* Do not depend on optimized libraries for a debug build and visa versa.
* Fix target name matching custom command output
* Fix target name matching custom command output conflict.
* Fix FindQt3 so that it does not find qt4
......
......@@ -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
......
......@@ -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]);
......
project(LibName)
set(LIBRARY_OUTPUT_PATH lib)
set(EXECUTABLE_OUTPUT_PATH lib)
add_library(bar SHARED bar.c)
add_library(foo SHARED foo.c)
target_link_libraries(foo bar)
add_executable(foobar foobar.c)
target_link_libraries(foobar foo)
#ifdef _WIN32
__declspec(dllexport)
#endif
extern void foo()
{
}
#ifdef _WIN32
__declspec(dllimport)
#endif
extern void foo();
#ifdef _WIN32
__declspec(dllexport)
#endif
void bar()
{
foo();
}
#ifdef _WIN32
__declspec(dllimport)
#endif
extern void bar();
int main()
{
bar();
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment