Skip to content

Restore handling of build directory inside a symlinked path

Brad King requested to merge brad.king/cmake:restore-cwd-translation-map into master

In !4572 (merged) we imported utils/kwsys@019afb6e from utils/kwsys!174 (merged). That caused GetCurrentWorkingDirectory to no longer send paths through the KWSys translation map and broke CMake's detection of the absolute path to a build directory containing a symbolic link. Add our own cmSystemTools::GetCurrentWorkingDirectory wrapper around the KWSys method in order to restore that mapping.

Test-case-by: @ben.boeckel
Issue: #16228
Fixes: #20900 (closed)
Backport: release

Merge request reports