From 4e6ff0ae247847ae5a2996d59106d8dc4aacced4 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 12 Jun 2018 11:02:28 -0400 Subject: 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 --- Source/cmSystemTools.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v0.12