turtle/build/build.xml
mat007 3aa4ad9d12 Added headers integrity check
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@292 860be788-9bd5-4423-9f1e-828f051e677b
2011-04-12 20:30:50 +00:00

81 lines
2.7 KiB
XML

<project name="turtle" default="all">
<property environment="env"/>
<import file="${env.PONEY_HOME}/poney.xml"/>
<target name="clean" description="clean intermediate build artifacts">
<delete dir="${out.dir}"/>
</target>
<target name="configure" description="update external libraries">
<update name="boost"/>
</target>
<target name="test" description="run unit tests">
<build-test name="turtle" depends="boost" mode="all">
<compilerarg value="-Wno-uninitialized" location="mid" if="is-cygwin"/>
</build-test>
</target>
<target name="analyse" description="run errors analyser">
<quiet>
<delete file="${reports.dir}/errors-${platform}.log"/>
<touch file="${reports.dir}/errors-${platform}.log"/>
</quiet>
<for param="file">
<fileset dir="${tests.dir}/errors_test" includes="*.cpp"/>
<sequential>
<record name="${reports.dir}/errors-${platform}.log" action="start" append="true"/>
<ant target="-analyse">
<property name="file" value="@{file}"/>
</ant>
<record name="${reports.dir}/errors-${platform}.log" action="stop"/>
</sequential>
</for>
</target>
<target name="-analyse">
<trycatch>
<try>
<echo>${file}</echo>
<build-test name="errors" excludes="**" depends="boost">
<fileset file="${file}"/>
</build-test>
</try>
</trycatch>
</target>
<target name="reports" description="generate code analysis reports">
<headers name="turtle"/>
</target>
<target name="bench" description="build compilation benchmark">
<build-app name="turtle_bench" mode="all">
<includepath path="${applications.dir}/turtle_bench"/>
</build-app>
</target>
<target name="export" description="export distribution">
<deploy>
<module name="turtle">
<include name="**/*.hpp"/>
</module>
</deploy>
<info version="svn rev ${svn.revision}" todir="${dist.dir}"/>
</target>
<target name="package" depends="export" description="package distribution">
<mkdir dir="${dist.dir}"/>
<zip destfile="${dist.dir}/${ant.project.name}.zip">
<fileset dir="${dist.dir}" includes="include/**"/>
<fileset dir="${root.dir}" includes="*.txt"/>
</zip>
<tar destfile="${dist.dir}/${ant.project.name}.tar.bz2" compression="bzip2">
<fileset dir="${dist.dir}" includes="include/**"/>
<fileset dir="${root.dir}" includes="*.txt"/>
</tar>
</target>
<target name="all" depends="configure,test,reports,export,package" description="configure, build and run tests, export and package distribution"/>
</project>