[CMake] CMake being too clever?

Amitha Perera perera at cs.rpi.edu
Fri Jul 22 13:35:50 EDT 2005


On Fri 22 Jul 2005, Brad King wrote:
> [CMake] has some fancy code to convert to a sensible relative path even
> in the case of symlinks and nfs mounts.  Native build tools such as
> make do not have this logic.  We're discussing this internally and
> will probably end up going back to full paths with this example as
> ammunition on the FAQ for why we use them.

That would be bad. The "right" way to do this would be for CMake to
remember what the user supplied as the way to get from the binary
tree to the source tree. So:

cmake ../src     # use relative
cmake /abc/src   # use "absolute" (not realpath())

In the latter case, the top-level CMakeLists.txt should be accessed
as "/abc/src/CMakeLists.txt", regardless of symlinks and mount
points. This has the advantage of working well with automounts.

Amitha.


More information about the CMake mailing list