CMP0064 broken?

Nicolás Alvarez nicolas.alvarez at gmail.com
Mon Dec 21 22:31:24 UTC 2015


> On Dec 21, 2015, at 18:13, David Faure <faure at kde.org> wrote:
> 
> KDE4Macros.cmake says
>   if (${second_PARAM} STREQUAL "TEST")
> which leads to
> 
> 
> CMake Warning (dev) at /d/kde/inst/kde4.14/share/apps/cmake/modules/KDE4Macros.cmake:775 (if):
>  Policy CMP0064 is not set: Support new TEST if() operator.  Run "cmake
>  --help-policy CMP0064" for policy details.  Use the cmake_policy command to
>  set the policy and suppress this warning.
> 
>  TEST will be interpreted as an operator when the policy is set to NEW.
>  Since the policy is not set the OLD behavior will be used.
> 
> I tried changing that to
>   if ("${second_PARAM}" STREQUAL "TEST")
> but that doesn't help, the warning is still there.
> 
> How much more quoting can I do? :-)
> 
> 
> Can't set the policy, this is from a file shared between many many projects.

That is incredibly stupid *throws brick at CMake*.

You could try the trick shell scripts (like autoconf-generated configure scripts) use to cope with empty strings:

if ("x${second_PARAM}" STREQUAL "xTEST")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20151221/21905344/attachment.html>


More information about the Kde-buildsystem mailing list