[CMake] Problems with ";" turning into spaces in add_command

Hendrik Sattler post at hendrik-sattler.de
Wed Sep 30 10:56:37 EDT 2009


Zitat von "Dixon, Shane" <Shane.Dixon at atmel.com>:
> I actually am using your scripts, but on Windows XP and that's where  
>  I'm having the troubles.  Everything works except that last step.   
> I  print out the XSL_TRANSFORM_COMMAND right before  
> add_custom_command:
>
> -- XSL_TRANSFORM_COMMAND =   
> C:/WINDOWS/system32/java.exe;-cp;:C:/opt/saxon6-5-5/saxon.jar:C:/opt/docbook-xsl-saxon-1.00/docbook-xsl-saxon_1.00.jar;com.icl.saxon.StyleSheet;C:/workspace/SIS/docs/SIS.xml;http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl
>
> Here is the add_custom_command:
>
>   add_custom_command (
>     OUTPUT ${ARGN}
>     COMMAND ${XSL_TRANSFORM_COMMAND}
>     DEPENDS "${infile}"
>     VERBATIM
>   )
>
> Here is the resulting command:
> C:\WINDOWS\system32\java.exe -cp   
> :C:/opt/saxon6-5-5/saxon.jar:C:/opt/docbook-xsl-saxon-1.00/docbook-xsl-saxon_1.00.jar com.icl.saxon.StyleSheet C:/workspace/SIS/docs/SIS.xml   
> http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl
>
> Any suggestions on how you got this working in Windows XP?  Don't   
> you get parsing errors from java.exe?  If I change the ":" to ";" in  
>  the above command for the -cp argument, everything works.

Interesting. On Windows, the classpath may have to use ';' as  
seperator. This also works on Linux but it needs quotes. I'll change  
that and send you an update for testing...

Thanks.

HS





More information about the CMake mailing list