]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/inherit_toolset.py
3 # Copyright 2003 Vladimir Prus
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
10 t
= BoostBuild
.Tester(pass_toolset
=0)
12 t
.write("a.cpp", "\n")
14 t
.write("yfc1.jam", """\
18 feature.extend toolset : yfc1 ;
21 generators.register-standard yfc1.compile : CPP : OBJ : <toolset>yfc1 ;
22 generators.register-standard yfc1.link : OBJ : EXE : <toolset>yfc1 ;
24 actions compile { yfc1-compile }
25 actions link { yfc1-link }
31 from b2.build import feature, generators
32 from b2.manager import get_manager
34 MANAGER = get_manager()
35 ENGINE = MANAGER.engine()
37 feature.extend('toolset', ['yfc1'])
39 generators.register_standard('yfc1.compile', ['CPP'], ['OBJ'], ['<toolset>yfc1'])
40 generators.register_standard('yfc1.link', ['OBJ'], ['EXE'], ['<toolset>yfc1'])
42 ENGINE.register_action(
47 ENGINE.register_action(
58 t
.write("yfc2.jam", """\
62 feature.extend toolset : yfc2 ;
63 toolset.inherit yfc2 : yfc1 ;
66 actions link { yfc2-link }
72 from b2.build import feature, toolset
73 from b2.manager import get_manager
75 MANAGER = get_manager()
76 ENGINE = MANAGER.engine()
78 feature.extend('toolset', ['yfc2'])
79 toolset.inherit('yfc2', 'yfc1')
81 ENGINE.register_action('yfc2.link', 'yfc2-link')
88 t
.write("jamfile.jam", "exe a : a.cpp ;")
89 t
.write("jamroot.jam", "using yfc1 ;")
91 t
.run_build_system(["-n", "-d2", "yfc1"])
92 t
.fail_test(t
.stdout().find("yfc1-link") == -1)
94 # Make sure we do not have to explicitly 'use' yfc1.
95 t
.write("jamroot.jam", "using yfc2 ;")
97 t
.run_build_system(["-n", "-d2", "yfc2"])
98 t
.fail_test(t
.stdout().find("yfc2-link") == -1)