Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [cdt-dev] Ant and ErrorParsers

Hi Roman,

actually the support for ANT build files in the platform is very good. 
Great content assist in the editor, debugging of ANT files, ...
There is also an parser for the ANT output that beautifies the output
and allows hyperlink navigation from the build output to the corresponding
line in the ANT files.
The problem is simply a matter of interconnecting the already available
ANT builder with the CDT stuff.
When using ANT to build C probjects and getting an error while compiling
a C source file with gcc, I want to get the error messages of gcc (which
are then included in the output of ANT) to be passed to the  CDT  error parsers,
so that they occur in the problems view.
I appended an output of a ANT buildfile as an example. The warning that occurs
during the target compile should be passed to the CDT error parser in order to
appear in the problems view. Actually the whole output of ant may be parsed to the 
error parsers, since (at least) the gcc error parser is smart enough to extract the 
lines of interest.

Regards 
Martin


> -----Ursprüngliche Nachricht-----
> Von: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] Im Auftrag von Roman Levenstein
> Gesendet: Freitag, 25. November 2005 16:52
> An: CDT General developers list.
> Betreff: RE: [cdt-dev] Ant and ErrorParsers
> 
> Hi,
> 
> actually, it should be probably rather easy to
> implement. As far as I understand, JDT part of Eclispe
> has a very advanced support for ANT files and
> hopefully also has a parser for error messages
> produced by ANT. So, it should be just a matter of
> copying several of JDT classes into CDT. 
> What do you think?
> 
> Regards,
>  Roman
> 
> --- Doug Schaefer <DSchaefer@xxxxxxx> wrote:
> 
> > I tend to agree. This would make a great enhancement
> > request in Bugzilla so
> > we don't lose it and hopefully someone picks it up
> > and implements a
> > solution.
> > 
> >  
> > 
> > Cheers,
> > 
> > Doug
> > 
> >  
> > 
> >   _____  
> > 
> > From: cdt-dev-bounces@xxxxxxxxxxx
> > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On
> > Behalf Of Behringer, Martin
> > Sent: Friday, November 25, 2005 9:59 AM
> > To: CDT General developers list.
> > Subject: AW: [cdt-dev] Ant and ErrorParsers
> > 
> >  
> > 
> > Hi Mattias,
> > 
> >  
> > 
> > thanks for the "-emacs" tip. That solved my problem.
> > 
> > But nevertheless would it be great if Ant scripts
> > were better supported by
> > CDT without the batch indirection (eg by an ant
> > builder that feeds the error
> > parser) .
> > 
> >  
> > 
> > Regards
> > 
> > Martin
> > 
> >  
> > 
> > 
> >   _____  
> > 
> > 
> > Von: cdt-dev-bounces@xxxxxxxxxxx
> > [mailto:cdt-dev-bounces@xxxxxxxxxxx] Im
> > Auftrag von Mattias Bertilsson
> > Gesendet: Freitag, 25. November 2005 15:41
> > An: CDT General developers list.
> > Betreff: Re: [cdt-dev] Ant and ErrorParsers
> > 
> > I agree with you about Ant vs. Make. And if you use
> > the -emacs commandline
> > option to Ant, it will not print the [<TASK>]
> > prefixes and the CDT error
> > parsers will work fine.
> > 
> > /Mattias Bertilsson
> > 
> > 
> > Behringer, Martin wrote: 
> > 
> > Hi all, 
> > 
> > we are using Ant scripts to build our C/C++ projects
> > because they are much
> > more powerful and portable than traditional
> > makefiles.
> > 
> > But unfortunately if we are invoking the scripts
> > from within eclipse we are
> > not able to get our compiler errors parsed by the
> > 
> > error parsers. 
> > I see two ways of invoking the scrpts at the moment.
> > Both work fine for
> > compiling, but I can't get my errors parsed. 
> > 
> > 1. In  the project properties dialog in the
> > "builders" option I added a new
> > Ant-Builder and registerd my build script. It
> > executes fine, all the
> > messages are displayed in the console, but the
> > messages are not passed to
> > the error parsers at all. How can I get the messages
> > parsed by the CDT error
> > parsers?
> > 
> > 2. I the project properties dialog in the "C/C++
> > Make Project" instead of
> > invoking the standard build command, I execute a
> > batch file to start ant. It
> > executes fine and now all messages are actually
> > passed to the error parsers.
> > But unfortunately ant adds the prefix of the
> > executed task before the actual
> > error message. It looks like this:
> > 
> >   [compile] D:\project\boot.c:81: error: for each
> > function it appears in.) 
> > 
> > Since the error parses dont't expect the task prefix
> > "[compile]" they are
> > not able to parse the messages properly and
> > therefore are not able to put
> > the into the problems view.
> > 
> > What can I do to use Ant AND get my errors correctly
> > parsed the the error
> > parsers? 
> > 
> >  
> > 
> > Thanks in advance 
> > Martin 
> > 
> > 
> > 
> > 
> > 
> > 
> >   _____  
> > 
> > 
> > 
> >  
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx <mailto:cdt-dev@xxxxxxxxxxx> 
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > <https://dev.eclipse.org/mailman/listinfo/cdt-dev> 
> >   
> > 
> > > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > 
> 
> 
> 
> 		
> __________________________________ 
> Yahoo! Music Unlimited 
> Access over 1 million songs. Try it free. 
> http://music.yahoo.com/unlimited/
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> 
startant.bat clean all 
Buildfile: build.xml

clean:
     [echo] Cleaning...

compile:
     [echo] Compile c files...
  [compile] D:\CC_views\thread.c: In function `_exit':
  [compile] D:\CC_views\thread.c:159: warning: `noreturn' function does return

link:
     [echo] Linking...

all:
     [echo] fertig...

BUILD SUCCESSFUL
Total time: 15 seconds

Back to the top