[CMake] stderr and stdout in cmake
Michael Wild
themiwi at gmail.com
Tue Jul 31 02:40:38 EDT 2012
On 07/30/2012 04:12 PM, luxInteg wrote:
> Greetings
>
> I have a bash script (from an auto-tools Makefile ) to translate
> to cmake
>
>
> My 'translation might go something like thios
>
> execute_process(COMMAND ${some_command} '2>&1' INPUT_FILE
> ${someFile2} OUTPUT_FILE /dev/null WORKING_DIRECTORY
> ${some_dir} )
>
> I am unconfortable with the '2>&1' and I tried reading up on
>
> file(WRITE ) and file(APPEND )
>
> but I am unsure how to proceed; for example how to use cmake -P or
> cmake -- build or using /dev/std* device files
>
> test [ ~ ]$ ls /dev/std* /dev/stderr /dev/stdin /dev/stdout test [
> ~ ]$
>
>
> Advice would be appreciated
>
> Yours sincerely luxInteg
You should read up on execute_process() instead:
> If OUTPUT_QUIET or ERROR_QUIET is given then the standard output or
> standard error results will be quietly ignored.
Michael
More information about the CMake
mailing list