Skip to content

WIP: SystemTools: remove the translation map

Ben Boeckel requested to merge ben.boeckel/kwsys:remove-translation-map into master

When determining full paths, CMake would treat the as-called path for the source and build directories as real paths even if they were symlinks. This causes problems when determining the relative path between the source and build directories when they are symlinks.

Take the following setup as an example:

/mnt/src/project/
    src/
    build/ -> /mnt/builds/project/build

With the translation map and /mnt/src/project/build/ as the build directory, CMake would use ../src as the relative path to the source tree from the build tree rather than ../../../src/project/src and lookups using ../src would fail. If the build directory were instead used as /mnt/builds/project/build, everything would work just fine.

The use case which originally required this functionality is being moved to code in CMake itself since it is the only project which cares about it. Other projects should not have to carry this code (it will be documented there).


Required for cmake/cmake#16228.

Merge request reports