[CMake] macro/functions in ctest scripts
Yngve Inntjore Levinsen
yngve.levinsen at gmail.com
Thu Aug 8 09:08:38 EDT 2013
Hi,
I have a project where we use ctest/cdash but not cmake. I wanted to add
a macro, but it looks like it doesn't support arguments correctly?
(differing from the documentation in 'ctest --help-command macro')
I tried to add this to the CTestTestfile.cmake:
macro(hello MESSAGE)
message("${MESSAGE}")
endmacro(hello)
hello("Hello World")
This does not work (it gives a warning that the message command was
called with wrong number of arguments). However, if I try to call just
hello() I get an error stating that I called the macro with the wrong
number of arguments.. What am I doing wrong here? I found the same
behaviour with functions.
Cheers,
Yngve
More information about the CMake
mailing list