[CMake] Processing the output from CMake build

Dieter Oberkofler doberkofler.lists at gmail.com
Wed Jul 15 10:43:13 EDT 2009


> I usually edit in some editors (vi, [x]emacs, eclipse etc...)
> and use command line a lot too.
I use BBEdit or the XCode editor on the Mac and CodeWright (an amazing
editor for programmer that after being sold to Borland some years ago is
unfortunately no longer available) on the PC.

> But I do not need that feature, would you explain why
> you need the 1 file compiled - 1 file error mapping?
Generally speaking to keep track of each individual file status. This
especially useful, when dealing with compiler warnings that would simply
"disappear" (after a new build when only looking at a single build log)
without an individual log file for each file to compile.
The second reason is more a convenience/performance reason when loading the
errors for a given source file.
But maybe I'm also just used to it (I was working like this for more than 15
years) and there is better way to do this?

> Could you point us to the feature request link?
http://public.kitware.com/Bug/view.php?id=6776

> Did you provide a patch?
No, I would now really know how to solve this.

> Since you told us the wrapper solution seems to work why do you need
> more?
It is just very complicated and a little hard to use and I would prefer to
stick with the build-in rules to compile and link if possible.

> vi /home/eric/workspace/certi-HEAD/libCERTI/TSCClock.cc +15
> will open the concerned file at the appropriate place.
I understand that this is the common way to do this but how are you dealing
with the following:
- You do no longer see the build results on your screen
- A 2nd build does no longer report the warnings from the 1st one because
files no longer need to be compiled
- The build itself is distributed and the results are not visible on your
screen
- I cannot remember about vi but the editors I use allow you to see the
source file and the errors next to each other. This is also supported when
having a unique build log file but takes (a lot) longer to be processed when
working on large projects

I hope, to have explained myself a little better and would be happy to learn
that what I'm doing is just no longer needed.

Thank you,
-D

> -----Original Message-----
> From: Eric Noulard [mailto:eric.noulard at gmail.com]
> Sent: Wednesday, July 15, 2009 2:12 PM
> To: Dieter Oberkofler
> Cc: CMake at cmake.org
> Subject: Re: [CMake] Processing the output from CMake build
> 
> 2009/7/15 Dieter Oberkofler <doberkofler.lists at gmail.com>:
> > I might sound old fashioned but I'm still only building from the
> command
> > line and only use an IDE (XCode on Mac and VS on the PC) when
> debugging.
> 
> OK, command line is great :-)
> I usually edit in some editors (vi, [x]emacs, eclipse etc...)
> and use command line a lot too.
> 
> > I therefore manually changed the CMake compile and link rules to
> always
> > generate an error file for each file that gets compiled or linked.
> 
> But I do not need that feature, would you explain why
> you need the 1 file compiled - 1 file error mapping?
> 
> > This is quite complex in CMake (I have filed an enhancement request
> some
> > time ago but it does not seem to affect many others) and basically
> needs to
> > create a simple wrapper application that encapsulates the compiler
> and
> > linker invocations and automatically redirects the output to a
> separate
> > file.
> 
> Could you point us to the feature request link?
> Did you provide a patch?
> 
> Since you told us the wrapper solution seems to work why do you need
> more?
> 
> > I was wondering how others deal with this issue and understand, if
> there are
> > better way to do this?
> 
> May be no one has the same feature request.
> Personnally even if I work with the command line, I don't need
> one file error per compiled file.
> 
> The compiler does printout the file/line etc... in which I can find
> the error/warning
> like in:
> 
> [  3%] Building CXX object libCERTI/CMakeFiles/CERTI.dir/TSCClock.o
> /home/eric/workspace/certi-HEAD/libCERTI/TSCClock.cc: In member
> function ‘virtual double certi::TSCClock::getResolution()’:
> /home/eric/workspace/certi-HEAD/libCERTI/TSCClock.cc:15: error: ‘nn’
> was not declared in this scope
> /home/eric/workspace/certi-HEAD/libCERTI/TSCClock.cc:16: error:
> expected `;' before ‘return’
> make[2]: *** [libCERTI/CMakeFiles/CERTI.dir/TSCClock.o] Erreur 1
> make[1]: *** [libCERTI/CMakeFiles/CERTI.dir/all] Erreur 2
> make: *** [all] Erreur 2
> 
> so I may easilly open the file for example:
> 
> vi /home/eric/workspace/certi-HEAD/libCERTI/TSCClock.cc +15
> 
> will open the concerned file at the appropriate place.
> 
> May be I do not understand your point?
> Could you explain why you need files?
> 
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org



More information about the CMake mailing list