[CMake] avoid substitution of semicolon

Tim Blechmann tim at klingt.org
Tue Mar 15 12:25:17 EDT 2011


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

-- 
tim at klingt.org
http://tim.klingt.org

/"\  ASCII Ribbon Campaign
\ /   no HTML in email & vCards
 X     no proprietary attachments
/ \     use open standards




More information about the CMake mailing list