On Nov 26, 2007 3:55 PM, Brandon Van Every <[EMAIL PROTECTED]> wrote:
>
> I noticed the "unpack" command.
>
> sources = {
>   "simpleLib.cxx",
>   "simpleCLib.c",
>   "simpleWe.cpp"
> }
>
> cm_add_library ("simpleLib", "STATIC", unpack(sources));
>
> Would this be necessary / paradigmatic in Lua?  In CMake I just use lists.

Reading the Lua docs, it seems one uses a table instead of a list.
There's a shorthand for calling a function that has 1 table as its
argument: f{whatever} instead of f({whatever}).  So I think the above
could have been:

cm_add_library{"simpleLib", "STATIC", "simpleLib.cxx", "simpleCLib.c",
"simpleWe.cpp"}

and of course the function would have to handle the table
appropriately.  Now I'll see if we can get rid of all those pointless
quotes.


Cheers,
Brandon Van Every
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to