Hi,

I have made a c/c++ task, which should eventually be able compile c/c++ using many different compilers, without having to write different task code for each compiler. Currently it only supports gcc though. It does keep track of which files have changed since the last build, so that it only compiles the files that are dirty.

An example of a build file:

<project name="Hello World" default="build" basedir=".">
        <description>test</description>
        <target name="build" description="compiles the source code">
                <cpp tmpdir = "debug" target = "executable" output = 
"debug/a.out">
                        <sources>
                                <include name = "*.cpp"/>
                        </sources>
                        <includedirs>
                                <include name = "../../libs/."/>
                        </includedirs>
                        <defines>
                                <define name = "_X86_"/>
                        </defines>
                        <packages>
                                <package name = "gtkmm-2.4"/>
                        </packages>
                        <libraries>
                                <include name = "../../libs/libgtkext.a"/>
                                <include name = "../../libs/libproperties.a"/>  
                        
                                <include name = "../../libs/libgeometry.a"/>
                                <include name = "../../libs/libxml.a"/>
                                <include name = "../../libs/libshared.a"/>
                        </libraries>
                </cpp>
        </target>
</project>

Greets,

Lieven van der Heide

Attachment: NAnt.Cpp.tar.bz2
Description: application/bzip2

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAntContrib-Developer mailing list
NAntContrib-Developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer

Reply via email to