1 |
williamc |
1.1 |
<h1>BuildFile Examples</h1>
|
2 |
|
|
<p>
|
3 |
|
|
The Default Build is configured at the project level. The default can be
|
4 |
|
|
overridden or parameters passed to the default build rules through the
|
5 |
|
|
BuildFile.
|
6 |
|
|
|
7 |
|
|
<p>
|
8 |
|
|
Examples of different build files are shown below
|
9 |
|
|
<ol>
|
10 |
|
|
<li>The Binary Executable<p>
|
11 |
|
|
The binary building rules require explicit specification of the binary targets
|
12 |
|
|
e.g.
|
13 |
|
|
<p>
|
14 |
|
|
<pre>
|
15 |
|
|
<External ref=cmsim>
|
16 |
|
|
<External ref=X11>
|
17 |
|
|
<Use ref=CARF>
|
18 |
|
|
<bin file=example1.cpp>
|
19 |
|
|
</bin>
|
20 |
|
|
<bin file=example2.cpp name=mytestexe>
|
21 |
|
|
</bin>
|
22 |
|
|
</Use>
|
23 |
|
|
</External>
|
24 |
|
|
</External>
|
25 |
|
|
</pre>
|
26 |
|
|
This file will build two executables called (example1 and mytestexe) from files example1.cpp and example2.cpp respectively. Both are built in the context of
|
27 |
|
|
external libraries cmsim and X11 as well as a local package from the same
|
28 |
|
|
project called CARF <em>(Note: Use tag not yet working)</em>.
|
29 |
|
|
<p>
|
30 |
|
|
<li>The library BuildFile
|
31 |
|
|
The only time you might want to override this is to exclude some files from a
|
32 |
|
|
build or include external package headers or assign the module to a group.
|
33 |
|
|
<br>e.g.<p>
|
34 |
|
|
<pre>
|
35 |
|
|
<Group name=G3>
|
36 |
|
|
skip_files := FakeClusterizer.cc SigmaClusterizer.cc
|
37 |
|
|
</pre>
|
38 |
|
|
<li>Empty Group
|
39 |
|
|
Sometimes the default builds arn't wanted at all. Switch them off with
|
40 |
|
|
<p>
|
41 |
|
|
<pre>
|
42 |
|
|
<AssociateGroup>
|
43 |
|
|
none
|
44 |
|
|
</AssociateGroup>
|
45 |
|
|
</pre>
|