-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
150 lines (117 loc) · 5.34 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<project name="jmatbench" basedir="." default="main">
<!--<property name="java.compilor" value="/opt/jdk1.7.0/bin/javac"/>-->
<!--<property name="java.vm" value="/opt/jdk1.7.0/bin/java"/>-->
<property name="java.compilor" value="/usr/lib/jvm/java-7-openjdk-i386/bin/javac"/>
<property name="java.vm" value="/opt/jdk/latest/bin/java"/>
<!--<property name="java.compilor" value="javac"/>-->
<!--<property name="java.vm" value="java"/>-->
<property name="args" value=""/>
<property name="src.dir" value="src"/>
<property name="test.dir" value="test"/>
<property name="build.dir" value="build"/>
<property name="lib.dir" value="lib"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="testbuild.dir" value="build/test"/>
<property name="testclasses.dir" value="${testbuild.dir}/classes"/>
<property name="testreport.dir" value="${testbuild.dir}/report"/>
<!-- If you want to launch the benchmark using a config file set this variable -->
<property name="benchmarkconfig" value=""/>
<property name="junit.dir" value="lib/"/>
<path id="project.classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<path id="test.classpath">
<path refid="project.classpath"/>
<fileset dir="${junit.dir}" includes="junit*.jar"/>
<fileset dir="${jar.dir}" includes="**/${ant.project.name}.jar"/>
</path>
<path id="jar.classpath">
<fileset dir="lib/" includes="EJML.jar"/>
<fileset dir="lib/" includes="xstream-1.4.4.jar"/>
</path>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="compile">
<!-- Capture the path as a delimited property using the refid attribute -->
<!--<property name="myclasspath" refid="project.classpath"/>-->
<!-- Emit the property to the ant console -->
<!--<echo message="Classpath = ${myclasspath}"/>-->
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}"
fork="yes" executable="${java.compilor}"
debug="true"
includejavaruntime="false"
includeantruntime="false" >
<classpath refid="project.classpath"/>
</javac>
</target>
<target name="jar" depends="compile">
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}"/>
</target>
<target name="app" depends="jar">
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.dir}/benchmark_app.jar" basedir="${classes.dir}">
<zipgroupfileset dir="lib" includes="EJML.jar"/>
<zipgroupfileset dir="lib" includes="xstream-1.4.4.jar"/>
<zipgroupfileset dir="lib" includes="jfreechart*/*.jar"/>
<zipgroupfileset dir="${jar.dir}" includes="${ant.project.name}.jar"/>
<manifest>
<attribute name="Main-Class" value="jmbench.tools.BenchmarkToolsMasterApp"/>
<attribute name="Class-Path" value="jar.classpath"/>
</manifest>
</jar>
</target>
<target name="test" depends="jar">
<mkdir dir="${testbuild.dir}"/>
<mkdir dir="${testreport.dir}"/>
<mkdir dir="${testclasses.dir}"/>
<javac srcdir="${test.dir}" destdir="${testclasses.dir}"
fork="yes" executable="${java.compilor}"
debug="true"
includejavaruntime="false"
includeantruntime="false" >
<classpath>
<path refid="test.classpath"/>
</classpath>
</javac>
<junit printsummary="yes" showoutput="yes">
<classpath>
<path refid="test.classpath"/>
<pathelement location="${testclasses.dir}"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="${testreport.dir}">
<fileset dir="${test.dir}" includes="**/Test*.java"/>
</batchtest>
</junit>
</target>
<target name="testreport">
<junitreport todir="${testreport.dir}">
<fileset dir="${testreport.dir}" includes="TEST-*.xml"/>
<report todir="${testreport.dir}"/>
</junitreport>
</target>
<target name="javadoc">
<javadoc
destdir="docs/api"
author="true"
version="true"
use="true"
windowtitle="Java Matrix Benchmark">
<packageset dir="src" defaultexcludes="yes">
<include name="jmbench/**"/>
</packageset>
<doctitle><![CDATA[<h1>Java Matrix Benchmark</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2009-2013 Peter Abeles All Rights Reserved.</i>]]></bottom>
<!--<group title="Group 1 Packages" packages="com.dummy.test.a*"/>-->
<!--<group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>-->
<!--<link offline="true" href="http://java.sun.com/j2se/1.5.0/docs/api/" packagelistLoc="C:\tmp"/>-->
<!--<link href="http://developer.java.sun.com/developer/products/xml/docs/api/"/>-->
</javadoc>
</target>
<target name="clean-build" depends="clean,jar"/>
<target name="main" depends="clean,app"/>
</project>