14
I would like to directly see the output of a command started by the EXECUTE_PROCESS command on stdout while the program is running.
I have the following test CMakeLists.txt file
PROJECT(TEST)
cmake_minimum_required(VERSION 2.8)
EXECUTE_PROCESS(COMMAND dir)
When run from the commandline it produces this
D:\tmp\testCMake\_build>"c:\Program Files (x86)\CMake 2.8\bin\cmake.exe" .
-- Configuring done
-- Generating done
-- Build files have been written to: D:/tmp/testCMake/_build
I would like to see the output from dir directly on the console.
I know I can capture the output using the OUTPUT_VARIABLE and ERROR_VARIABLE arguments. But, that provides the result at the end of the command run.
According to the documentation the output should normally be passed through
If no OUTPUT_* or ERROR_* options are given the output will be shared with the corresponding pipes of the CMake process itself.
I am using CMake 2.8.3 on Windows Vista