Saturday, August 19, 2006

cpp tasks in Apache ANT

I was recently introduced to 'ant'. A very simple make tool that allows for a generic way of carrying out your build process without too many hassels. Most of the work was done for having it as the build tool for java, however it has considerably evolved and is used all over the place, especially for cpp. This is the snippet used for getting the cpp make process done... way more simpler than the standard Makefile right.

<target name="compile-cpp" depends="init">
<cc debug="false" link="executable" multithreaded="true" name="g++" outfile="${basedir}/bin" warnings="none" objdir="${basedir}/tmp">
<fileset dir="${basedir}/src">
<include name="*.cpp">
<compilerarg value="-Wall">
<compilerarg value="-g">
<compilerarg value="-c">
<linkerarg value="-lpthread">

Technorati Tags: ,,

1 comment:

varunthacker said...

Hi . Nice post. Do you know how to add multiple dir attributes in fileset