[CMake] passing a list to a CMake script

Brandon J. Van Every bvanevery at gmail.com
Wed Jul 12 17:44:14 EDT 2006


Say I do:

${CMAKE_COMMAND} -DMYLIST="${whatever}" -P myscript.cmake

MYLIST comes through as a string.  In myscript.cmake, I've been 
reconstructing the string into a list, on the risky assumption that 
blank spaces " "should be converted to semicolons ";" .  Is there a 
cleaner way to pass a list to a CMake script?

Cheers,
Brandon Van Every




More information about the CMake mailing list