Alexander Neundorf wrote:
Von: "Brandon J. Van Every"
  
Alexander Neundorf wrote:
    
Hi,

the attached patch changes the behaviour of SEPARATE_ARGUMENTS() so that
      
it doesn't replace escaped spaces anymore.

Great!  I've been running into this and just working around it 
manually.  Another issue: if the arguments contain quoted strings with 
spaces in them, they really shouldn't be broken apart.
    

Do you have a simple example ?
  

MACRO(MAKE_WINDOWS_PATH pathname)
  # An extra \\ escape is necessary to get a \ through CMake's processing.
  STRING(REPLACE "/" "\\" ${pathname} "${${pathname}}")
  # Enclose with UNESCAPED quotes.  This means we need to escape our
  # quotes once here, i.e. with \"
  SET(${pathname} \"${${pathname}}\")
ENDMACRO(MAKE_WINDOWS_PATH)

SET(MYPATH "C:/Program Files/Chicken")
MESSAGE("${MYPATH}")
MAKE_WINDOWS_PATH(MYPATH)
MESSAGE("${MYPATH}")
SEPARATE_ARGUMENTS(MYPATH)
MESSAGE("${MYPATH}")


Brandon J. Van [EMAIL PROTECTED] ~
$ cmake -P windowspath.cmake
C:/Program Files/Chicken
"C:\Program Files\Chicken"
"C:\Program;Files\Chicken"



_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to