In my opinion this could be a useful addition. I think you should open a featuure request and incluse the related operations.
Andrew On 6/26/07, Miguel A. Figueroa-Villanueva <[EMAIL PROTECTED]> wrote:
Hello everyone, I have made some changes to the wiki page on lists (http://www.cmake.org/Wiki/CMakeMacroListOperations) to reflect the new LIST command in CMake 2.4+. I hope I have presented the changes in an appropriate way. There is one macro in the wiki page that the current LIST command couldn't support, the LIST_CONTAINS. This macro provides a functionality that I believe is quite useful and is in line with the other LIST command operations. As such, I went ahead and implemented it in my cmake source tree and have provided a patch for it below. The changes add the following functionality: LIST List operations. LIST(CONTAINS <list> <value> <output variable>) CONTAINS will return TRUE if the element specified is in the list. SET(MYLIST hello world foo bar) LIST(CONTAINS MYLIST foo RESULT1) -- RESULT1: TRUE LIST(CONTAINS MYLIST baby RESULT2) -- RESULT2: FALSE I would like to know if this is a feature of interest to the CMake developers and if it may be included in future distributions. If not, I would stick to supporting this through local MACROS. Also, I would gladly provide a patch for the following two related operations: 1. LIST(CONTAINS <list> <value> [<value> ...] <output variable>) - returns TRUE if all values are in the <list> 2. LIST(CONTAINS_ANY <list> <value> [<value> ...] <output variable>) - returns TRUE if any of the values are in the <list> but I'm not sure if the developers want to keep a simpler interface. Hence, I would appreciate feedback on whether this is of interest and if I should open a Feature Request. Thanks, --Miguel -- Miguel A. Figueroa Villanueva +1 787 832-4040 x.3610-4006 Department of Electrical and Computer Engineering University of Puerto Rico - Mayagüez Campus _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
-- ___________________________________________ Andrew J. P. Maclean Centre for Autonomous Systems The Rose Street Building J04 The University of Sydney 2006 NSW AUSTRALIA Ph: +61 2 9351 3283 Fax: +61 2 9351 7474 URL: http://www.cas.edu.au/ ___________________________________________
_______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
