[CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

Clark Wang dearvoid at gmail.com
Thu Sep 4 01:01:20 EDT 2014


Hi,

I don't understand why the following code would not print "true" (tested
with cmake-3.0):

  set(a b)
  set(b c)
  if(a STREQUAL b OR a STREQUAL c)
    message("true")
  endif()

>From my understanding, no matter how magic the if command interprets its
arguments, one of the expressions (a STREQUAL b) and (a STREQUAL c) must be
true but I'm wrong. Anyone has a reasonable explanation?

Thanks.

-clark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140904/e0b16efd/attachment.html>


More information about the CMake mailing list