Sylvain Benner a écrit :
...
It works but it's not really what I want since it doesn't display the output in real time. The process can be pretty long and the intermediate info are pretty important.
...
On unix you can insert the 'tee' command
in the list of commands where you want
to keep the output stream.

Or as with my last answer do it in a more portable
way but using perl like this:

INCLUDE(FindPerl)

SET(THE_FILE "tee.txt")
EXECUTE_PROCESS(
       COMMAND ls
COMMAND "${PERL_EXECUTABLE}" -e "open TEE, \">\", \"${THE_FILE}\" ; while(<STDIN>){print; print TEE;}"
       COMMAND tr [a-z] [A-Z]
       OUTPUT_VARIABLE OUTVAR)

MESSAGE("${OUTVAR}")

The 'tee' equivalent in perl is inserted between
'ls' and 'tr' and capture the original output from
ls before setting it uppercase
(ls and tr are here only to demonstrate the use
since it is not portable at all)

Philippe.

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to