[CMake] execute_process, output_variable : semicolons are stripped out

jbd evadream at gmail.com
Fri Oct 3 18:08:22 EDT 2008


RTFM.

message("${_RES}")

Sorry for the noise guys.

jbd a écrit :
> Hello everybody,
> 
> i've got a little problem which i can't figure out. If i run a command 
> with execute_process which deal with a file containing some semi colon 
> ";", i lose them in the OUTPUT_VARIABLE. Any idea ?
> 
> 
> Here is a self explanatory CMakeLists.txt. Create a file called "myfile" 
> containing some ";"
> 
> ===
> project(foobar)
> cmake_minimum_required(VERSION 2.6)
> 
> # myfile contains:
> # foo ;
> # bar ;
> 
> 
> execute_process(
>     COMMAND cat myfile
>     OUTPUT_VARIABLE _RES
> )
> 
> message(${_RES})
> 
> # will print the initial content without the semi-colon
> # foo
> # bar
> ===



More information about the CMake mailing list