[Development] Build system for Qt 6
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Tue Oct 30 09:04:26 CET 2018
Am 30.10.2018 um 06:29 schrieb resurrection at centrum.cz:
>
> set(var1 "Hello")
>
> set(var2 "Hello")
>
> if(var1 EQUAL var2)
>
> message("They are equal")
>
> endif()
>
> Guess what, it prints NOTHING despite docs explicitly saying this
> should work. Nothig will help, STREQUAL, MATCHES, dereferencing the
> arguments, whatever.
>
You read the docs wrong:
EQUAL: True if the given string or variable’s value is a valid number
and equal to that on the right.
Neither var1 nor var2 is a valid numbers.
You want
if (var1 STREQUAL var2) and this works as expected (and documented).
//
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20181030/fc9d3466/attachment.html>
More information about the Development
mailing list