Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/tools/build/v2/test/inherit_toolset.py @ 12

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
8from BoostBuild import Tester, List
9from string import find
10
11t = Tester(pass_toolset=0)
12
13t.write("a.cpp", """
14""")
15
16t.write("yfc1.jam", """
17import toolset ;
18import generators ;
19
20toolset.register yfc1 ;
21
22rule init ( )
23{
24}
25
26generators.register-standard yfc1.compile : CPP : OBJ : <toolset>yfc1 ;
27generators.register-standard yfc1.link : OBJ : EXE : <toolset>yfc1 ;
28
29actions compile
30{
31    yfc1-compile
32}
33
34actions link
35{
36    yfc1-link
37}
38
39
40""")
41
42t.write("yfc2.jam", """
43import toolset ;
44
45toolset.register yfc2 ;
46toolset.inherit yfc2 : yfc1 ;
47
48rule init ( )
49{
50}
51
52actions link
53{
54    yfc2-link
55}
56""")
57
58t.write("Jamfile", """
59exe a : a.cpp ;
60""")
61
62t.write("project-root.jam", """
63using yfc1 ;
64""")
65
66t.run_build_system("-n -d2 yfc1")
67t.fail_test(find(t.stdout(), "yfc1-link") == -1)
68
69# Make sure we don't have to explicit 'use' yfc1.
70t.write("project-root.jam", """
71using yfc2 ;
72""")
73
74t.run_build_system("-n -d2 yfc2")
75t.fail_test(find(t.stdout(), "yfc2-link") == -1)
76
77t.cleanup()
78
Note: See TracBrowser for help on using the repository browser.