[cmake-developers] Surprising CMP0054 behavior
Craig Scott
craig.scott at crascit.com
Mon Mar 26 08:07:34 EDT 2018
Am I missing something, or is the following result surprising to others as
well:
set(somevar YES)
if ("somevar")
message("Get here if CMP0054 is OLD (seems okay)")
else()
message("Get here if CMP0054 is NEW (surprising?)")
endif()
I would have thought that even with CMP0054 being NEW, the if condition
would still evaluate to true since it is going to test a non-empty string
that doesn't match any of the defined false constants.
--
Craig Scott
Melbourne, Australia
https://crascit.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20180326/429dcf56/attachment.html>
More information about the cmake-developers
mailing list