CMake expanduser tilde ~

To have the most reliable path operations in CMake, it’s typically best to resolve paths to the full expanded path. Note: there are a few CMake functions that desire relative paths, but those are clearly spelled out in the docs.

expanduser.cmake for CMake expands the ~ tilde character to the user home directory on all operating systems, including Windows.


Related: