Last change
on this file since 32 was
29,
checked in by landauf, 17 years ago
|
updated boost from 1_33_1 to 1_34_1
|
File size:
1.4 KB
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
3 | # Copyright (C) Vladimir Prus 2006. |
---|
4 | # Distributed under the Boost Software License, Version 1.0. (See |
---|
5 | # accompanying file LICENSE_1_0.txt or copy at |
---|
6 | # http://www.boost.org/LICENSE_1_0.txt) |
---|
7 | |
---|
8 | from BoostBuild import Tester, List |
---|
9 | import string |
---|
10 | |
---|
11 | t = Tester() |
---|
12 | |
---|
13 | t.write("Jamroot", """ |
---|
14 | exe a1 : a1.cpp : <conditional>@a1-rule ; |
---|
15 | |
---|
16 | rule a1-rule ( properties * ) |
---|
17 | { |
---|
18 | if <variant>debug in $(properties) |
---|
19 | { |
---|
20 | return <define>OK ; |
---|
21 | } |
---|
22 | } |
---|
23 | |
---|
24 | exe a2 : a2.cpp : <conditional>@$(__name__).a2-rule <variant>debug:<optimization>speed ; |
---|
25 | |
---|
26 | rule a2-rule ( properties * ) |
---|
27 | { |
---|
28 | if <optimization>speed in $(properties) |
---|
29 | { |
---|
30 | return <define>OK ; |
---|
31 | } |
---|
32 | } |
---|
33 | |
---|
34 | exe a3 : a3.cpp : <conditional>@$(__name__).a3-rule-1 <conditional>@$(__name__).a3-rule-2 ; |
---|
35 | |
---|
36 | rule a3-rule-1 ( properties * ) |
---|
37 | { |
---|
38 | if <optimization>speed in $(properties) |
---|
39 | { |
---|
40 | return <define>OK ; |
---|
41 | } |
---|
42 | } |
---|
43 | |
---|
44 | rule a3-rule-2 ( properties * ) |
---|
45 | { |
---|
46 | if <variant>debug in $(properties) |
---|
47 | { |
---|
48 | return <optimization>speed ; |
---|
49 | } |
---|
50 | } |
---|
51 | |
---|
52 | """) |
---|
53 | |
---|
54 | t.write("a1.cpp", """ |
---|
55 | #ifdef OK |
---|
56 | int main() {} |
---|
57 | #endif |
---|
58 | |
---|
59 | """) |
---|
60 | |
---|
61 | t.write("a2.cpp", """ |
---|
62 | #ifdef OK |
---|
63 | int main() {} |
---|
64 | #endif |
---|
65 | |
---|
66 | """) |
---|
67 | |
---|
68 | t.write("a3.cpp", """ |
---|
69 | #ifdef OK |
---|
70 | int main() {} |
---|
71 | #endif |
---|
72 | |
---|
73 | """) |
---|
74 | |
---|
75 | |
---|
76 | |
---|
77 | t.run_build_system() |
---|
78 | |
---|
79 | t.expect_addition("bin/$toolset/debug/a1.exe") |
---|
80 | t.expect_addition("bin/$toolset/debug/optimization-speed/a2.exe") |
---|
81 | t.expect_addition("bin/$toolset/debug/optimization-speed/a3.exe") |
---|
82 | |
---|
83 | t.cleanup() |
---|
84 | |
---|
Note: See
TracBrowser
for help on using the repository browser.