]>
Commit | Line | Data |
---|---|---|
92f5a8d4 | 1 | //// |
b32b8144 FG |
2 | Copyright 2008 Jurko Gospodnetic |
3 | Copyright 2017 Rene Rivera | |
4 | Distributed under the Boost Software License, Version 1.0. | |
1e59de90 | 5 | (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) |
92f5a8d4 | 6 | //// |
b32b8144 | 7 | |
92f5a8d4 | 8 | = Hello |
b32b8144 FG |
9 | |
10 | This example shows a very basic Boost Build project set up so it compiles a | |
92f5a8d4 | 11 | single executable from a single source file: |
b32b8144 | 12 | |
92f5a8d4 TL |
13 | .`hello.cpp` |
14 | [source,cpp] | |
15 | ---- | |
16 | include::../../example/hello/hello.cpp[tag=source] | |
17 | ---- | |
b32b8144 FG |
18 | |
19 | Our `jamroot.jam` is minimal and only specifies one `exe` target for the | |
20 | program: | |
21 | ||
92f5a8d4 TL |
22 | .`jamroot.jam` |
23 | [source,jam] | |
24 | ---- | |
25 | include::jamroot.jam[] | |
26 | ---- | |
b32b8144 FG |
27 | |
28 | Building the example yields: | |
29 | ||
92f5a8d4 TL |
30 | [source,bash] |
31 | ---- | |
b32b8144 FG |
32 | > cd /example/hello |
33 | > b2 | |
34 | ...found 8 targets... | |
35 | ...updating 4 targets... | |
36 | common.mkdir bin/clang-darwin-4.2.1 | |
37 | common.mkdir bin/clang-darwin-4.2.1/debug | |
38 | clang-darwin.compile.c++ bin/clang-darwin-4.2.1/debug/hello.o | |
39 | clang-darwin.link bin/clang-darwin-4.2.1/debug/hello | |
40 | ...updated 4 targets... | |
1e59de90 | 41 | > bin/clang-darwin-4.2.1/debug/hello |
b32b8144 | 42 | Hello! |
92f5a8d4 | 43 | ---- |
b32b8144 | 44 | |
92f5a8d4 TL |
45 | NOTE: The actual paths in the `bin` sub-directory will depend on your |
46 | toolset. |