Last change
on this file since 12 was
12,
checked in by landauf, 17 years ago
|
added boost
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
3 | # Copyright (C) Vladimir Prus 2003. Permission to copy, use, modify, sell and |
---|
4 | # distribute this software is granted provided this copyright notice appears in |
---|
5 | # all copies. This software is provided "as is" without express or implied |
---|
6 | # warranty, and with no claim as to its suitability for any purpose. |
---|
7 | |
---|
8 | from BoostBuild import Tester, List |
---|
9 | from string import find |
---|
10 | |
---|
11 | t = Tester(pass_toolset=0) |
---|
12 | |
---|
13 | t.write("a.cpp", """ |
---|
14 | """) |
---|
15 | |
---|
16 | t.write("yfc1.jam", """ |
---|
17 | import toolset ; |
---|
18 | import generators ; |
---|
19 | |
---|
20 | toolset.register yfc1 ; |
---|
21 | |
---|
22 | rule init ( ) |
---|
23 | { |
---|
24 | } |
---|
25 | |
---|
26 | generators.register-standard yfc1.compile : CPP : OBJ : <toolset>yfc1 ; |
---|
27 | generators.register-standard yfc1.link : OBJ : EXE : <toolset>yfc1 ; |
---|
28 | |
---|
29 | actions compile |
---|
30 | { |
---|
31 | yfc1-compile |
---|
32 | } |
---|
33 | |
---|
34 | actions link |
---|
35 | { |
---|
36 | yfc1-link |
---|
37 | } |
---|
38 | |
---|
39 | |
---|
40 | """) |
---|
41 | |
---|
42 | t.write("yfc2.jam", """ |
---|
43 | import toolset ; |
---|
44 | |
---|
45 | toolset.register yfc2 ; |
---|
46 | toolset.inherit yfc2 : yfc1 ; |
---|
47 | |
---|
48 | rule init ( ) |
---|
49 | { |
---|
50 | } |
---|
51 | |
---|
52 | actions link |
---|
53 | { |
---|
54 | yfc2-link |
---|
55 | } |
---|
56 | """) |
---|
57 | |
---|
58 | t.write("Jamfile", """ |
---|
59 | exe a : a.cpp ; |
---|
60 | """) |
---|
61 | |
---|
62 | t.write("project-root.jam", """ |
---|
63 | using yfc1 ; |
---|
64 | """) |
---|
65 | |
---|
66 | t.run_build_system("-n -d2 yfc1") |
---|
67 | t.fail_test(find(t.stdout(), "yfc1-link") == -1) |
---|
68 | |
---|
69 | # Make sure we don't have to explicit 'use' yfc1. |
---|
70 | t.write("project-root.jam", """ |
---|
71 | using yfc2 ; |
---|
72 | """) |
---|
73 | |
---|
74 | t.run_build_system("-n -d2 yfc2") |
---|
75 | t.fail_test(find(t.stdout(), "yfc2-link") == -1) |
---|
76 | |
---|
77 | t.cleanup() |
---|
78 | |
---|
Note: See
TracBrowser
for help on using the repository browser.