CMP0064 broken?

David Faure faure at kde.org
Fri Dec 25 09:35:34 UTC 2015


On Wednesday 23 December 2015 12:40:33 Matt McCormick wrote:
> Hi David,
> 
> On Wed, Dec 23, 2015 at 2:17 AM, David Faure <faure at kde.org> wrote:
> >> Please try
> >>
> >>   if ("x${second_PARAM}x" STREQUAL "xTESTx")
> >
> > This looks like it should work, but isn't that an awful workaround?
> > Are we back to shell/autoconf programming from 1990?
> 
> It is preferable to actually set the policy.

Isn't setting the policy to OLD always considered a bad idea in the long run,
because that means "yes I know I'm using deprecated behaviour which
could go away one day"?
Usually there is a proper way to port to the new behaviour, otherwise
it means the new behaviour is wrong.

That's what I'm asking here, what will be the proper way to test that a
variable contains the string TEST, in 10 years time when CMP0064
no longer exists?

> > Surely cmake can make the difference between a keyword (TEST)
> > and a string ("TEST") ?
> 
> Patches that include tests would be welcome. Note that it will have to
> cover all cases of CMP0054:
> 
>   https://cmake.org/cmake/help/v3.4/policy/CMP0054.html?highlight=policy#policy:CMP0054

So you break it, I fix it? Sorry, no, that's your responsibility, not mine.

> PS. Please send these questions on the appropriate mailing list (cmake-users).

I can't exactly subscribe to 50 mailing-lists, days are too short to follow every
opensource project in the world.

I thought you might want to know about breakages introduced by your change.
Clearly my feedback isn't welcome, I'm being told to live with it and use awful
workarounds, or to fix it myself. That's not a very satisfactory outcome.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5



More information about the Kde-buildsystem mailing list