[CMake] cmake rewrites part of -S argument depending on the current directory!

Marc Herbert marc.herbert at gmail.com
Thu May 30 13:25:21 EDT 2019


Thanks Brad for the reference, really appreciated. Some of 16228 seems
relevant. Other parts unfortunately not because 16228:
- tries to deal with all the crazy ways users can use symbolic links,
including relative paths and relative links,
- tries to deal with all the ways users can invoke cmake,
- naturally cares about backward compatibility,
- goes deep into the implementation details,
- refers to other issues with even more implementation details.

So I'm admittedly getting lost in all the details and combinatorial
explosion. Because 16228 looks like a bug I suspect the behaviour I
described is also considered a bug but I'm not even sure?

I believe the example I gave is one of the simplest and safest use cases of
symbolic links that : passing both -B and -S, no relative path, no relative
link. For such a "most explicit" use case, will future cmake versions be
unaffected by the current directory?

-B is a brand new option so there's only so much backward compatibility it
has to care about, right?

Long story short I think this admittedly complex topic could use some high
level documentation or - if the symlink situation is hopelessly complicated
and everything fails - at least a big "AVOID SYMLINKS [FOR NOW]" warning
somewhere in the documentation. Fair enough? Sorry if I missed that.

Thanks!

Marc


Le jeu. 30 mai 2019 à 07:15, Brad King <brad.king at kitware.com> a écrit :

> On 5/30/19 3:22 AM, Marc Herbert wrote:
> > IF the current directory is a parent of the -S argument AND
> > one component of the current directory is a symbolic link THEN
> > the leading part of the -S argument is overridden using that
> > symbolic link.
>
> See this issue:
>
>   https://gitlab.kitware.com/cmake/cmake/issues/16228
>
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190530/ed2687f6/attachment.html>


More information about the CMake mailing list