-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
89 lines (71 loc) · 2.91 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="AeminiumGPU" basedir="." default="main">
<property name="src.dir" value="src" />
<property name="build.dir" value="bin" />
<property name="lib.dir" value="lib" />
<property name="main-class" value="code.PiCalc" />
<property name="spooned.dir" value="spooned" />
<property name="compiler.src.dir" value="compiler-src" />
<property name="compiler.build.dir" value="compiler" />
<property name="compiler.lib.dir" value="compiler-lib" />
<path id="classpath">
<path refid="compiler.classpath" />
<fileset dir="${lib.dir}" includes="**/*.jar" />
</path>
<path id="classpath.test">
<path refid="classpath" />
</path>
<path id="compiler.classpath">
<pathelement location="${compiler.build.dir}" />
<fileset dir="${compiler.lib.dir}" includes="**/*.jar" />
<fileset dir="${lib.dir}" includes="**/*.jar" />
</path>
<target name="compile-compiler">
<mkdir dir="${compiler.build.dir}" />
<javac srcdir="${compiler.src.dir}" destdir="${compiler.build.dir}" classpathref="compiler.classpath" />
</target>
<target name="precompile" depends="compile-compiler">
<!-- define spoon task -->
<taskdef name="spoon" classname="spoon.SpoonTask" classpathref="compiler.classpath" />
<spoon classpathref="compiler.classpath" verbose="true">
<sourceSet dir="${src.dir}" />
<templateset dir="${compiler.src.dir}/aeminium/gpu/compiler/template" />
<processor type="aeminium.gpu.compiler.processing.MapLambdaProcessor" />
<processor type="aeminium.gpu.compiler.processing.ReduceLambdaProcessor" />
</spoon>
</target>
<target name="compile" depends="precompile">
<mkdir dir="${build.dir}" />
<javac srcdir="${spooned.dir}" destdir="${build.dir}" classpathref="classpath" debug="true" />
</target>
<target name="main" depends="compile">
</target>
<target name="fetchruntime">
<exec executable="ant" dir="../AeminiumGPU/">
<arg value="jar" />
</exec>
<copy file="../AeminiumGPU/dist/AeminiumGPU.jar" todir="${lib.dir}" />
</target>
<target name="run" depends="fetchruntime, compile">
<java fork="true" classname="${main-class}">
<classpath>
<path location="${build.dir}" />
<path refid="classpath" />
</classpath>
<!-- <jvmarg value="-Xrunhprof:cpu=samples,file=log.txt,depth=3"/> -->
</java>
</target>
<target name="test" depends="compile">
<junit failureProperty="test.failure" fork="true">
<jvmarg value="-Xms512m" />
<jvmarg value="-Xmx1536m" />
<classpath refid="classpath.test" />
<formatter type="brief" usefile="false" />
<test name="${testcase}" todir="${compiler.build.dir}" if="${testcase}"/>
<batchtest>
<fileset dir="${compiler.build.dir}" includes="aeminium/gpu/tests/*.class aeminium/gpu/tests/*/*.class" excludes="**/*$*.class **/*Template.class" />
</batchtest>
</junit>
<fail message="test failed" if="test.failure" />
</target>
</project>