Skip to content

Commit d465818

Browse files
author
Sergey Koshcheyev
committed
Build process updates:
- build HashCodeProvider using <ilasm> task to avoid rebuilding it if nothing changed. - extract nhibernate configuration properties into build-common/nhibernate-properties.xml. SVN: trunk@2395
1 parent 31644fa commit d465818

File tree

5 files changed

+29
-13
lines changed

5 files changed

+29
-13
lines changed

build-common/common-project.xml

+7-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
After including the file, a target should be defined to initialize
2020
configuration variables according to the project being built.
21-
The standard of this target is init (but any other name can be chosen).
21+
The standard name of this target is init (but any other name can be chosen).
2222
The init target should depend on (or call) target common.init defined
2323
in this file.
2424

@@ -29,19 +29,20 @@
2929
if it exists.
3030

3131
- common.compile-dll
32-
compile a DLL, generating the documentation and using Clover if enabled.
32+
compile a DLL, generating the documentation file (.xml) and using Clover
33+
if enabled.
3334

34-
- common.generate-assemblyinfo, common.generate-assemblyinfoversion
35-
generate an AssemblyInfo.cs or AssemblyInfoVersion.cs file from
36-
assembly.* NAnt properties.
35+
- common.generate-assemblyinfo
36+
generate an AssemblyInfo.cs file from assembly.* NAnt properties.
3737

3838
- common.run-tests
3939
run compiled NUnit tests.
4040

4141
All compile/run targets put the output in bin.dir. Common.compile*
4242
targets use source fileset with id="project.sources", assembly fileset
4343
with id="project.references" and resource fileset with id="project.resources"
44-
to compile the project. The source and resource filesets are optional.
44+
to compile the project. The source and resource filesets are optional and
45+
default to **/*.cs files and no files respectively.
4546

4647
</description>
4748

build-common/common.xml

+1-3
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,7 @@
136136
<property name="current.build.defines" value="${build.defines}" />
137137

138138
<!-- properties used to connect to database for testing -->
139-
<property name="nhibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
140-
<property name="nhibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
141-
<property name="nhibernate.connection.connection_string" value="Server=(local);initial catalog=nhibernate;Integrated Security=SSPI" />
139+
<include buildfile="nhibernate-properties.xml" />
142140

143141
<!-- named project configurations -->
144142
<target name="set-debug-project-configuration" description="Perform a 'debug' build">
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" ?>
2+
<project xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd">
3+
<property name="nhibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
4+
<property name="nhibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
5+
<property name="nhibernate.connection.connection_string" value="Server=(local);initial catalog=nhibernate;Integrated Security=SSPI" />
6+
</project>

default.build

+7
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@
132132
</target>
133133

134134
<target name="test" depends="init build" description="Runs all NHibernate tests for the current framework">
135+
<!-- -->
136+
<nant target="test">
137+
<buildfiles refid="buildfiles.tests" />
138+
</nant>
139+
<!-- -->
140+
<!--
135141
<foreach item="File" property="buildfile">
136142
<in>
137143
<items refid="buildfiles.tests" />
@@ -144,6 +150,7 @@
144150
</exec>
145151
</do>
146152
</foreach>
153+
-->
147154
</target>
148155

149156
<target name="coverage-report" description="Builds the Test Coverage reports"

src/HashCodeProvider/HashCodeProvider.build

+8-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@
2323
</target>
2424

2525
<target name="build" depends="generate-assemblyinfo">
26-
<exec
27-
program="${framework::get-framework-directory(framework::get-target-framework())}\ilasm"
28-
commandline="HashCodeProvider.il /dll /output:..\..\lib\net\1.1\HashCodeProvider.dll /key:..\NHibernate.snk"
29-
/>
26+
<ilasm
27+
target="dll"
28+
output="${root.dir}/lib/net/1.1/HashCodeProvider.dll"
29+
keyfile="${key.file}">
30+
<sources>
31+
<include name="HashCodeProvider.il" />
32+
</sources>
33+
</ilasm>
3034
<copy file="HashCodeProvider.license.txt" todir="../../lib/net/1.1" />
3135
</target>
3236

0 commit comments

Comments
 (0)