On Nov 27, 2007 2:32 PM, Brandon Van Every <[EMAIL PROTECTED]> wrote: > 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.
Lua also has a varargs interface via ... so there's no reason this has to be done with a table. But I guess you knew that already. So, the real wart is that in CMake we only have to type ${sources} and in Lua we'd have to type unpack(sources) all the time. That's gonna get old. > Now I'll see if we can get rid of all those pointless quotes. It doesn't look possible. That's annoying. Cheers, Brandon Van Every _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake