[CMake] Newbie: How to generate .err files during compile

Eric Noulard eric.noulard at gmail.com
Fri Feb 9 04:27:02 EST 2007


2007/2/9, Alexander Neundorf <a.neundorf-work at gmx.net>:
>
> -------- Original-Nachricht --------
> Datum: Fri, 9 Feb 2007 08:37:47 +0100
> Von: "d.1234567890" <d.1234567890 at qualiant.at>
> An: CMake at cmake.org
> CC:
> Betreff: [CMake] Newbie: How to generate .err files during compile
>
> > Sorry if I double post but:
> > I was wondering, if someone could help me to understand how to force cmake
> > to generate makefiles that automatically redirect the error output of a
> > compiler to a *.err file ?
>
> I don't think that's currently supported.
> How about "make 2> compile.err" ?

This will put all error in 1 file.
If you want separate file you may try to wrap  your C compiler
with a script that will do the job for you and tell CMake
to use this "compiler"

SET(CMAKE_C_COMPILER "myCCwrapper.sh")

or set env var while running cmake.
CC=myCCwrapper.sh cmake

See: http://www.cmake.org/Wiki/CMake_Useful_Variables

I don't know if writing the wrapper would be difficult or not.

Nevertheless not sure why you want such feature since
you cannot ignore compile error?

-- 
Erk


More information about the CMake mailing list