ソースを参照

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
 /** Normalizes paths while resolving symlinks only when followed
     by '..' components.  Does not require paths to exist, but
     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;
 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;
 struct RealPath;
 
 
 /** Normalizes paths in memory without disk access.
 /** 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.
   /** Convert an input path to an absolute path with no '/..' components.
       Backslashes in the input path are converted to forward slashes.
       Backslashes in the input path are converted to forward slashes.
       Relative paths are interpreted w.r.t. GetLogicalWorkingDirectory.
       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
       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);
   static std::string ToNormalizedPathOnDisk(std::string p);
 
 
 #ifndef CMAKE_BOOTSTRAP
 #ifndef CMAKE_BOOTSTRAP