Am Donnerstag, den 12.05.2011, 11:50 +0100 schrieb Glenn Coombs:
> I think you probably wanted to write and call your function like this:
> 
> FUNCTION(build var)
>        MESSAGE(STATUS "var: ${var}")
> ENDFUNCTION(build)
> 
> SET(var red blue yellow green)
> build("${var}")
> 
> That prints out as you would expect:
> 
> -- var: red;blue;yellow;green
> 
Both versions are possible. 
My point was, that in the case I described, the name of the parameter of
the function may not be the same as the name of variable the function is
called.

With your version you don't have this problem.
Thanks.

Micha



_______________________________________________
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