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

dieter oberkofler d.1234567890 at qualiant.at
Fri Feb 9 07:46:13 EST 2007


To your feedback:

1) We are very much used to have one error file for each source file because
this is how our editor (good old CodeWrite) expects to get the errors and
because it is very convenient to check the results after a complete build.
Especially if run on a remote server or as a distributed build.
2) The redirection of all the make output in one file is clear but would
work but does not allow us to have individual error files.
3) The suggestion by Alexander to use a wrapper seems the way to go and I
just need to figure out how to get the individual error file name.
4) I'm actually surprised that it is so uncommon to use individual error
files and would be trilled if the CMAke makers would consider of including
this feature.

Thank you

-Dieter


-----Original Message-----
From: Eric Noulard [mailto:eric.noulard at gmail.com] 
Sent: Friday, February 09, 2007 10:27 AM
To: Alexander Neundorf
Cc: d.1234567890; CMake at cmake.org
Subject: Re: [CMake] Newbie: How to generate .err files during compile

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