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
--
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://www.cmake.org/mailman/listinfo/cmake