From 099a4ea50c4fbe5fe13cf6fa4abcf970c49e787c Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 20 Dec 2017 11:35:09 -0500 Subject: cmcmd: Fix cmake_symlink_library for inconsistent slashes With the Ninja generator we may invoke `cmake_symlink_library` with different slash conventions (`/` versus `\`) for different arguments. Fix comparison of the paths/names given to tolerate this. Fixes: #17579 --- Source/cmcmd.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index b78fbe6..f660f43 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1237,9 +1237,12 @@ int cmcmd::HashSumFile(std::vector& args, cmCryptoHash::Algo algo) int cmcmd::SymlinkLibrary(std::vector& args) { int result = 0; - std::string const& realName = args[2]; - std::string const& soName = args[3]; - std::string const& name = args[4]; + std::string realName = args[2]; + std::string soName = args[3]; + std::string name = args[4]; + cmSystemTools::ConvertToUnixSlashes(realName); + cmSystemTools::ConvertToUnixSlashes(soName); + cmSystemTools::ConvertToUnixSlashes(name); if (soName != realName) { if (!cmcmd::SymlinkInternal(realName, soName)) { cmSystemTools::ReportLastSystemError("cmake_symlink_library"); -- cgit v0.12