[CMake] keep semicolons alive

Alexander.Camek at elektrobit.com Alexander.Camek at elektrobit.com
Tue Oct 9 09:22:32 EDT 2007


Hi Maik

> I want to fetch a environment variable which contains 
> semicolon by intention, modify it a little and use it with a 
> custom command:
> 
> #TEXINPUTS_latex is ":;${workspace_loc}/texmf/texmf/tex//"
> SET(TEXINPUTS "$ENV{TEXINPUTS_latex};${PROJECT_SOURCE_DIR}")
> #TEXINPUTS should be 
> ":;${workspace_loc}/texmf/texmf/tex//;/path/to/project"
> 
> ADD_CUSTOM_COMMAND(
>     OUTPUT       ${PROJECT_BINARY_DIR}/${LATEX_target}.ps
>     COMMAND	TEXINPUTS="${TEXINPUTS}" 
>                        ${DVIPS_CONVERTER}   
>                        ${DVI_FILE_WE}.dvi   -o${PS_FILE_WE}.ps
>    DEPENDS    ${DVI_FILE_WE}.dvi
>    COMMENT	"dvi -> ps for PDF_${LATEX_target}" )
> 
> The problem is that the semicolons are replaced by space " ".
> 
> How can I achieve what I want?

I have got a similar problem.

But I solved it by escaping the semicolon with a backslash, e.g ; -> \;

Hope it will work for you.

Greetings

Alexander


----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.



More information about the CMake mailing list