I want to set "FOO" to "TRUE" iff both "COND_A" and "COND_B" are true.I
tried the following:

set (FOO (${COND_A} AND ${COND_B}))

but then FOO get's a value like "(;TRUE;AND;TRUE;)" instead of "TRUE". So I
had to write instead:

if (${COND_A} AND ${COND_B})
    set (FOO TRUE)
else ()
    set (FOO FALSE)
endif ()

Is there a better way?

Thanx,
Yaron
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to