Просмотр исходного кода

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
Brad King 7 лет назад
Родитель
Сommit
4e6ff0ae24
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      Source/cmSystemTools.cxx

+ 2 - 1
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;
   }