[CMake] avoid substitution of semicolon
Clinton Stimpson
clinton at elemtech.com
Tue Mar 15 12:49:33 EDT 2011
On Tuesday, March 15, 2011 10:25:17 am Tim Blechmann wrote:
> hi all,
>
> i am trying to write a ctest script, compiling for different OSX
> architectures. the CMAKE_OSX_ARCHITECTURES option uses the semicolon to
> distinguish between architectures, but my attempts to generate the
> argument string with semicolons haven't been successful, it seems they are
> not escaped:
>
> foreach(ARCH ppc i386 x86_64 "ppc\;i386" "i386\;x86_64"
> "ppc\;i386\;x86_64") set(x -DCMAKE_OSX_ARCHITECTURES=${ARCH})
> message (${x})
> endforeach()
>
> gives me:
> -DCMAKE_OSX_ARCHITECTURES=ppc
> -DCMAKE_OSX_ARCHITECTURES=i386
> -DCMAKE_OSX_ARCHITECTURES=x86_64
> -DCMAKE_OSX_ARCHITECTURES=ppci386
> -DCMAKE_OSX_ARCHITECTURES=i386x86_64
> -DCMAKE_OSX_ARCHITECTURES=ppci386x86_64
>
> any idea how i could create the correct argument string?
>
> thanks, tim
Have you tried quotes in your message() so it doesn't remove the semi-colons?
message("${x}")
--
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
More information about the CMake
mailing list