[Cmake-commits] [cmake-commits] king committed cmake.cxx 1.434 1.435
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Oct 21 13:12:28 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv13462/Source
Modified Files:
cmake.cxx
Log Message:
Use copies for versioned names on Windows
Versioned UNIX libraries and executables produce multiple names for a
single target using one of
cmake -E cmake_symlink_library
cmake -E cmake_symlink_executable
to create symlinks to the real file for the extra names. However, when
cross-compiling from Windows to Linux we cannot create symlinks. This
commit teaches CMake to make copies instead of symbolic links when
running on windows. While this approach does not produce exactly what
Linux wants to see, at least the build will complete and the binary will
run on the target system. See issue #9171.
Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.434
retrieving revision 1.435
diff -C 2 -d -r1.434 -r1.435
*** cmake.cxx 21 Oct 2009 17:10:22 -0000 1.434
--- cmake.cxx 21 Oct 2009 17:12:21 -0000 1.435
***************
*** 3130,3135 ****
--- 3130,3139 ----
cmSystemTools::RemoveFile(link.c_str());
}
+ #if defined(_WIN32) && !defined(__CYGWIN__)
+ return cmSystemTools::CopyFileAlways(file.c_str(), link.c_str());
+ #else
std::string linktext = cmSystemTools::GetFilenameName(file);
return cmSystemTools::CreateSymlink(linktext.c_str(), link.c_str());
+ #endif
}
More information about the Cmake-commits
mailing list