[cmake-developers] Windows symbolic links handling

Brad King brad.king at kitware.com
Thu Aug 24 07:55:11 EDT 2017


On 08/24/2017 03:19 AM, Manu wrote:
> I have fixed it but I am struggling with the new policy. The
> behaviour change goes into cmSystemTools::GetRealPath implementation
> and SystemTools has no context, so I am not sure how to check the policy.

The policy would have to be checked higher in the stack and used to
choose alternative implementations.

> Mimicking policy CMP0067 usage, I could create an old and a new version
> of GetRealPath and check for the policy prior calling it all along the code.
> On the other hand, I could pass the policy status as a parameter to every
> GetRealPath call. Which is the proper way?

Likely a second API would be needed.  The KWSys GetRealPath could be
taught to handle symlinks on Windows.  If it turns out a policy is
needed then a cmSystemTools:: alternative in CMake only could be added.

> To perform a pull request, should I previously open an issue about
> this or it is enough with the discusion here in the mailing list.

For reference, this issue has been opened:

  https://gitlab.kitware.com/cmake/cmake/issues/17206

I think we can try this without a policy first.

Thanks,
-Brad


More information about the cmake-developers mailing list