--- cmake-3.25.1.orig/Source/kwsys/SystemTools.cxx 2022-11-30 14:57:03.000000000 +0100 +++ cmake-3.25.1.orig/Source/kwsys/SystemTools.cxx 2023-01-15 02:34:52.419837078 +0100 @@ -3435,7 +3435,7 @@ errorMsg = msg.str(); return false; } - pathOut = self; + pathOut = SystemTools::GetRealPath(self, &errorMsg); return true; } @@ -3538,7 +3538,7 @@ // Split the input path components. std::vector path_components; - SystemTools::SplitPath(in_path, path_components); + SystemTools::SplitPath(SystemTools::GetRealPath(in_path, nullptr), path_components); out_components.reserve(path_components.size()); // If the input path is relative, start with a base path. @@ -3547,11 +3547,11 @@ if (in_base) { // Use the given base path. - SystemTools::SplitPath(*in_base, base_components); + SystemTools::SplitPath(SystemTools::GetRealPath(*in_base, nullptr), base_components); } else { // Use the current working directory as a base path. std::string cwd = SystemTools::GetCurrentWorkingDirectory(); - SystemTools::SplitPath(cwd, base_components); + SystemTools::SplitPath(SystemTools::GetRealPath(cwd, nullptr), base_components); } // Append base path components to the output path. @@ -3589,7 +3589,7 @@ SystemTools::ConvertToUnixSlashes(newPath); #endif // Return the reconstructed path. - return newPath; + return SystemTools::GetRealPath(newPath, nullptr); } }