Am 30.10.2018 um 06:29 schrieb resurrect...@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
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to