[CMake] Function and list

Enrique Izaguirre enrique.izaguirre at gmail.com
Wed Mar 2 10:01:54 EST 2011


As far as I know, you have to use foreach( ) to print element by element in
the list.

BR

Enrique

On Wed, Mar 2, 2011 at 8:52 AM, Anton Sibilev <anton.sibilev at gmail.com>wrote:

> Hello! I have a function like
>
> FUNCTION (MY_FUNC list)
>   MESSAGE ("..${list}")
> ENDFUNCTION ()
>
> And I call it like:
> SET (list 11 22 33 44 55)
> MY_FUNC (list)
>
> and output is:
> ..11
>
> How I can work with lists or unknown number of arguments in functions?
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110302/52279b4f/attachment.htm>


More information about the CMake mailing list