ant and cpptask
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   graham_walsh
Posted On:   Wednesday, May 19, 2004 02:14 AM

Hi,

I'm trying to use ant 1.6.1 with cpptask to compile my c++ source code. Everything is dandy, compilation time is waaay down however I'm noticing that everytime I run ant in the source dir in question, it is recompiling all the .cpp files despite the fact they haven't changed. The task is pretty standard;



link="static"
objdir=".obj"
outfile="test"






any idea how I can get ant to compile *only* those source files that actually need to be rebuilt?


thanks a million

GrahamO

Re: ant and cpptask

Posted By:   Anonymous  
Posted On:   Wednesday, May 19, 2004 03:39 AM

I don´t know the cpp-tasks from AntContrib, but here some points:

  • you should use
     tags to format code snippets, it´s much easier to read

  • you don´t have to use './' in file attributes (like objdir, fileset-dir), a '.' is enough (and more common)

  • dependy checks should be done in the task itself, therefore the cpp-compiler decides which files have to be compiled. If it does too much, the task implementation is wrong :-)

  • workaround to that is using the (Ant) or (AntContrib) tasks

About | Sitemap | Contact