Hi all,

  I am trying to write a simple if ( or ) expression but this leads to
the following error message:
...
CMake Warning (dev) at CMakeLists.txt:10 (if):
  given arguments:

    "var" "STREQUAL" "foo" "or" "var" "STREQUAL" "bla"

  Unknown arguments specified
...

Here is a simple test to reproduce:

project(test)

set(var "foo")
if(var STREQUAL "foo")
  message("FOO")
endif()
if(var STREQUAL "bla")
  message("BLA")
endif()
if(var STREQUAL "foo" or var STREQUAL "bla")
  message("FOO or BLA")
endif()

How should I do the test with the OR expression ?

Thanks,
-- 
Mathieu
_______________________________________________
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