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.
This commit is contained in:
Brad King 2025-03-07 18:14:57 -05:00
parent abee5a5068
commit 75913fe430
2 changed files with 7 additions and 5 deletions

View File

@ -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.

View File

@ -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