Piotr Dobrogost wrote:
Hi

Can the list operations in cmake be carried out on a list with space
separated elements without converting this list to cmakes' inner format?

Below, "standard" I guess, way of doing this makes me cry :)

STRING(REPLACE " " ";" _LIST ${CMAKE_C_STANDARD_LIBRARIES})
LIST(REMOVE_ITEM _LIST "wldap32.lib")
TO_LIST_SPACES(_LIST CMAKE_C_STANDARD_LIBRARIES)


There is no such thing as a list with spaces in CMake, that is a string. So, no there is no way to use the list command on strings directly. You could use string(replace ) to do what you are trying to do.

-Bill

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to