I have 2 variables that hold boolean values. One is the result of a 
try_compile() and the other has the expected outcome. Now I want to check if 
the expectation is correct, so I tried:

if (_COMPILE_RESULT EQUAL SHOULD_COMPILE)

Which works if both are true or different, but the result is "false" if both 
variables are false, too. I played around with expanding the variables or 
quoting, but no change. The only way I got the expected result was this:

if (_COMPILE_RESULT EQUAL SHOULD_COMPILE OR (NOT _COMPILE_RESULT) EQUAL (NOT 
SHOULD_COMPILE)

This is not really what I would have expected. Is there a less ugly way to get 
the expected result?

Eike
-- 

Attachment: signature.asc
Description: This is a digitally signed message part.

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to