summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-06-12 15:02:28 (GMT)
committerBrad King <brad.king@kitware.com>2018-06-12 15:15:50 (GMT)
commit4e6ff0ae247847ae5a2996d59106d8dc4aacced4 (patch)
treef5a0755d4d838dc23293a4828f1ad1c78f8370bc
parent8738eba336d0f89cd3c183fe32413283abe9140d (diff)
downloadCMake-4e6ff0ae247847ae5a2996d59106d8dc4aacced4.zip
CMake-4e6ff0ae247847ae5a2996d59106d8dc4aacced4.tar.gz
CMake-4e6ff0ae247847ae5a2996d59106d8dc4aacced4.tar.bz2
Windows: Restore support for running CMake through a symlink
The change in commit v3.11.3~3^2 (cmSystemTools: Revert GetRealPath implementation on Windows, 2018-05-29) broke the feature added by commit v3.11.0-rc1~64^2 (Windows: Add support for running CMake tools through a symlink, 2018-01-21). Use `GetRealPathResolvingWindowsSubst` in the latter code path to restore it. Fixes: #17882
-rw-r--r--Source/cmSystemTools.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 6f326de..9575c05 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2117,7 +2117,8 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
wchar_t modulepath[_MAX_PATH];
::GetModuleFileNameW(NULL, modulepath, sizeof(modulepath));
std::string path = cmsys::Encoding::ToNarrow(modulepath);
- std::string realPath = cmSystemTools::GetRealPath(path, NULL);
+ std::string realPath =
+ cmSystemTools::GetRealPathResolvingWindowsSubst(path, NULL);
if (realPath.empty()) {
realPath = path;
}