[Cmake] howto sort a cmake list ?

William A. Hoffman billlist at nycap.rr.com
Fri, 20 Feb 2004 08:39:42 -0500


I guess you could do it with a TRY_COMPILE and an EXEC_PROGRAM.
But, I do not think there is a way to sort a list in the cmake language
right now.   Just curious, why would you want to sort a list in a cmake file?

-Bill


At 05:53 AM 2/20/2004, Michael T. Wagner wrote:
>Hi all,
>
>this might be a dumb question but I didnt figure out how to do it - I've set
>a list with SET (list blah dablah ..) and want to sort it alphabetically.
>So is there any SORT command in CMake for lists ?
>I tried to do a FOREACH loop with the list elements and compare them with IF
>(${var} STRLESS ${var}) but it didnt work with two variables.
>What am I missing ?
>
>Thanks alot for any answer,
>
>Mike
>
>
>
>
>
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake