Hi, > Von: Gaetan Lehmann <[EMAIL PROTECTED]> > > Hi, > > We have implemented for WrapITK some list functions in pure cmake. It > would be > nice to be able to replace them by native functions. Some of them are > already > there (SORT for example), but some are missing: > - LIST(UNIQUE <list>) remove all the duplicate items in the list. > - LIST(INTERSECT <list> <element> [<element> ...]) compute the > intersection > of the list and the list of element given in parameter. I think the output > variable should not contain any duplicate item, but it should be > discussed. > - LIST(HAS_ITEM <list> <item> <output variable>) set output variable to > ON if > the item is in the list, and to OFF otherwise. > > Also, I'm surprised to see that the LIST commands always modify the list, > and > does not produce a new one. It is definitively not always the desired > behavior. It is not a important issue - some macro can easily be > created to workaround that. You could just use SET() to create a copy beore the LIST() command. > Finally, I think REMOVE and REMOVE_ITEM should be swapped - for me, the > item > is what is removed from the list, not its index. Currently, we have: > > LIST(REMOVE <variable> <value> [<value> ...]) > LIST(REMOVE_ITEM <variable> <index> [<index> ...]) Maybe REMOVE_VALUE and REMOVE_INDEX ? Bye Alex
-- Echte DSL-Flatrate dauerhaft für 0,- Euro*! "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
