浏览代码

PathResolver: Document in comments the on-disk case lookup on macOS

This was added by commit 08040ced86 (cmake: Look up on-disk case of
input paths on macOS, 2024-11-20, v4.0.0-rc1~390^2).  Update relevant
comments.
Brad King 9 月之前
父节点
当前提交
75913fe430
共有 2 个文件被更改,包括 7 次插入5 次删除
  1. 3 3
      Source/cmPathResolver.h
  2. 4 2
      Source/cmSystemTools.h

+ 3 - 3
Source/cmPathResolver.h

@@ -78,11 +78,11 @@ namespace Policies {
 
 /** Normalizes paths while resolving symlinks only when followed
     by '..' components.  Does not require paths to exist, but
-    reads on-disk case of paths that do exist (on Windows).  */
+    reads on-disk case of paths that do exist (on Windows and macOS).  */
 struct LogicalPath;
 
-/** Normalizes paths while resolving all symlinks.
-    Requires paths to exist, and reads their on-disk case (on Windows).  */
+/** Normalizes paths while resolving all symlinks.  Requires paths to exist,
+    and reads their on-disk case (on Windows and macOS).  */
 struct RealPath;
 
 /** Normalizes paths in memory without disk access.

+ 4 - 2
Source/cmSystemTools.h

@@ -441,9 +441,11 @@ public:
   /** Convert an input path to an absolute path with no '/..' components.
       Backslashes in the input path are converted to forward slashes.
       Relative paths are interpreted w.r.t. GetLogicalWorkingDirectory.
-      On Windows, the on-disk capitalization is loaded for existing paths.
       This is similar to 'realpath', but preserves symlinks that are
-      not erased by '../' components.  */
+      not erased by '../' components.
+
+      On Windows and macOS, the on-disk capitalization is loaded for
+      existing paths.  */
   static std::string ToNormalizedPathOnDisk(std::string p);
 
 #ifndef CMAKE_BOOTSTRAP