[CMake] Processing the output from CMake build

Eric Noulard eric.noulard at gmail.com
Wed Jul 15 08:12:27 EDT 2009


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