[CMake] How to generate compiler error files with CMake

Dieter Oberkofler d.1234567890 at qualiant.at
Tue Jan 15 10:47:20 EST 2008


We only need the error files when running the makefile on the shell as most
IDE's have a build-in handling of the errors.
When working on the shell, or with large (or distributed build systems) it
is most helpful to have an error file for each compilation or link process. 
We actually are currently replacing the compiler with a shell script (using
a SET(CMAKE_CXX_COMPILER=my_gcc) command) but this is quite complicated
within CMake.
Especially on the Windows platform, we really had to create our own little
c-app in order to parse the temporary parameter file in order to get this
working.
I was wondering if we are the only ones that (still) love using the good old
error files or this might be an enhancement that others would like as well.
-Dieter 

-----Original Message-----
From: Bill Hoffman [mailto:bill.hoffman at kitware.com] 
Sent: Tuesday, January 15, 2008 14:42
To: d.1234567890 at qualiant.at
Cc: cmake at cmake.org
Subject: Re: [CMake] How to generate compiler error files with CMake

Dieter Oberkofler wrote:
> When compiling an individual file (file.cpp), I would like to have an 
> error file (file.err) containing all errors generated during the
compilation.
> Is there an easy way to generate a compiler error file (next to the 
> stdout) for each individual file compiled using CMake?
> Thankk you,
> Dieter
> 
> 
There is no easy way to do this with CMake.  With makefiles, you might be
able to replace the compiler with a shell script that does this. 
But, it would not work with visual studio or xcode projects.

-Bill




More information about the CMake mailing list