On 11/10/2011 02:57 PM, Robert Dailey wrote: > I have an internal cache variable and I want to append items to it in a > FOR loop using FORCE. Can list( APPEND ) do this for me? If not, can > someone show me an example of how this would be done? What are the > performance implications of each solution? > > --------- > Robert Dailey
AFAIK if the cache variable is INTERNAL, you don't need FORCE. list(APPEND) can't do this for you, but you can use a un-cached variable to assemble the list in the loop, and the set the INTERNAL cache variable after the loop finished. Also, if the values in that variable are not supposed to be persistent across multiple CMake runs, you might want to use a global property instead. Michael -- 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
