Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/inline.py @ 32

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.6 KB
Line 
1#!/usr/bin/python
2
3# Copyright 2003, 2006 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)
6
7from BoostBuild import Tester, List
8
9t = Tester()
10
11t.write("Jamroot", """
12project : requirements <link>static ;
13exe a : a.cpp [ lib helper : helper.cpp ] ;
14""")
15
16t.write("a.cpp", """
17extern void helper();
18int main()
19{
20    return 0;
21}
22
23""")
24
25t.write("helper.cpp", """
26void helper()
27{
28}
29""")
30
31t.run_build_system()
32t.expect_addition("bin/$toolset/debug/link-static/a__helper.lib")
33t.rm("bin/$toolset/debug/link-static/a__helper.lib")
34
35t.run_build_system("a__helper")
36t.expect_addition("bin/$toolset/debug/link-static/a__helper.lib")
37
38t.rm("bin")
39
40# Now check that inline targets with the same name but
41# present in different places are not confused between
42# each other, and with top-level targets.
43t.write("Jamroot", """
44project : requirements <link>static ;
45exe a : a.cpp [ lib helper : helper.cpp ] ;
46exe a2 : a.cpp [ lib helper : helper.cpp ] ;
47""")
48
49t.run_build_system()
50t.expect_addition("bin/$toolset/debug/link-static/a.exe")
51t.expect_addition("bin/$toolset/debug/link-static/a__helper.lib")
52t.expect_addition("bin/$toolset/debug/link-static/a2__helper.lib")
53
54# Check that the 'alias' target does not change name of
55# inline targets, and that inline targets are explicit.
56t.write("Jamroot", """
57project : requirements <link>static ;
58alias a : [ lib helper : helper.cpp ] ;
59explicit a ;
60""")
61t.rm("bin")
62
63t.run_build_system()
64t.expect_nothing_more()
65
66t.run_build_system("a")
67t.expect_addition("bin/$toolset/debug/link-static/helper.lib")
68
69t.cleanup()
70
Note: See TracBrowser for help on using the repository browser.