[CMake] if+or: Unknown arguments specified
Mathieu Malaterre
mathieu.malaterre at gmail.com
Fri Jun 10 03:23:37 EDT 2011
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
More information about the CMake
mailing list