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
===

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to