Re: [CMake] Passing a CMake list "as is" to a custom target

2011-06-23 Thread Hauke Heibel
Thank you for the feedback. I adopted using "::" as a separator and I added en- and decode functions to my macro library. It's probably the cleanest solution. The only remaining comment is that opposed to the example David posted, I get wrong results when escaping the semi-colon in the regular exp

Re: [CMake] Passing a CMake list "as is" to a custom target

2011-06-22 Thread Michael Hertling
On 06/22/2011 10:32 PM, David Cole wrote: > On Wed, Jun 22, 2011 at 4:24 PM, Hauke Heibel > wrote: > >> On Wed, Jun 22, 2011 at 10:09 PM, Michael Hertling >> wrote: >>> You might use -DMY_VARIABLE="${ARGUMENTS}" without VERBATIM, and >>> SEPARATE_ARGUMENTS(MY_VARIABLE) in Foo.cmake. This doesn't

Re: [CMake] Passing a CMake list "as is" to a custom target

2011-06-22 Thread David Cole
On Wed, Jun 22, 2011 at 4:24 PM, Hauke Heibel wrote: > On Wed, Jun 22, 2011 at 10:09 PM, Michael Hertling > wrote: > > You might use -DMY_VARIABLE="${ARGUMENTS}" without VERBATIM, and > > SEPARATE_ARGUMENTS(MY_VARIABLE) in Foo.cmake. This doesn't prevent > > the list's conversion, but seems a bit

Re: [CMake] Passing a CMake list "as is" to a custom target

2011-06-22 Thread Hauke Heibel
On Wed, Jun 22, 2011 at 10:09 PM, Michael Hertling wrote: > You might use -DMY_VARIABLE="${ARGUMENTS}" without VERBATIM, and > SEPARATE_ARGUMENTS(MY_VARIABLE) in Foo.cmake. This doesn't prevent > the list's conversion, but seems a bit smarter than a FOREACH loop. I considered this but since MY_VA

Re: [CMake] Passing a CMake list "as is" to a custom target

2011-06-22 Thread Michael Hertling
On 06/22/2011 09:14 PM, Hauke Heibel wrote: > Hi, > > My CMake version is 2.8.3 and I am trying to run a CMake script as a > custom target via > > add_custom_target(RunFooTarget ALL > COMMAND ${CMAKE_COMMAND} > -DMY_VARIABLE=${ARGUMENTS} > -P Foo.cmake > VERBATIM > ) > > where ${ARGU

[CMake] Passing a CMake list "as is" to a custom target

2011-06-22 Thread Hauke Heibel
Hi, My CMake version is 2.8.3 and I am trying to run a CMake script as a custom target via add_custom_target(RunFooTarget ALL COMMAND ${CMAKE_COMMAND} -DMY_VARIABLE=${ARGUMENTS}     -P Foo.cmake   VERBATIM ) where ${ARGUMENTS} is a standard CMake list (semi-colon separated). Unfortunately,