[CMake] Causing cmake to use stderr instead of stdout.

David Cole david.cole at kitware.com
Mon Nov 19 12:08:43 EST 2007


By 'dos' I assume you mean the cmd prompt for Windows 2000, XP or Vista...?You
can just as easily use 2>&1 syntax in there also.

cmake --help 1>cmake1.txt 2>cmake2.txt
cmake --help 2>cmake2.txt 1>&2

works just fine from a 'dos' prompt on Win2k or later...



On 11/19/07, Josef Karthauser <joe.karthauser at geomerics.com> wrote:
>
> :) Sure I can do that.  However I was trying to use 'dos'.  World of
> pain.  Using cygwin's bourne shell instead :).
>
> Joe
>
> > -----Original Message-----
> > From: cmake-bounces+joe.karthauser=geomerics.com at cmake.org
> > [mailto:cmake-bounces+joe.karthauser=geomerics.com at cmake.org] On
> Behalf
> > Of Dizzy
> > Sent: 19 November 2007 16:48
> > To: cmake at cmake.org
> > Subject: Re: [CMake] Causing cmake to use stderr instead of stdout.
> >
> > On Monday 19 November 2007 18:37:02 Josef Karthauser wrote:
> > > Is it possible (with relative easy) to have cmake send all output to
> > > stderr instead of stdout?
> >
> > Well on a bourne shell I think you can do:
> >
> > cmake /path/to/sources 1>&2
> >
> > And it will run cmake redirecting fd 1 (stdout) to fd 2 (stderr). If
> > you need
> > to further direct the output make sure you write that before "1>&2"
> > part as
> > in:
> >
> > cmake /path/to/sources 2> logfile.txt 1>&2
> >
> > --
> > Mihai RUSU                                    Email: dizzy at roedu.net
> >                       "Linux is obsolete" -- AST
> > _______________________________________________
> > CMake mailing list
> > CMake at cmake.org
> > http://www.cmake.org/mailman/listinfo/cmake
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20071119/551605ed/attachment.htm


More information about the CMake mailing list