[CMake] macro/functions in ctest scripts
Yngve Inntjore Levinsen
yngve.levinsen at gmail.com
Thu Aug 8 10:01:23 EDT 2013
Den 08. aug. 2013 15:24, skrev Jakub Zakrzewski:
> Hi,
>
>>> >>macro(hello MESSAGE)
>>> >> message("${MESSAGE}")
>>> >>endmacro(hello)
>>> >>hello("Hello World")
> You're expecting MESSAGE to be variable name but you call it with string value. So
> message("${MESSAGE}")
> evaluates to
> message("${Hello World}")
> and this to
> message("")
> and cmake does not like calling it with empty string :)
Are you sure? The same macro works fine in a CMakeLists.txt file. I also
tried
message(MESSAGE)
and
message(${MESSAGE})
neither of which works (the first prints MESSAGE).
The macro is also the same as what is in the example here (without the
"" around but that shouldn't make an impact):
http://www.cmake.org/cmake/help/syntax.html
Based on my current knowledge of cmake the macro is proper cmake syntax.
Cheers,
Yngve
More information about the CMake
mailing list