]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/inline.py
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)
9 t
= BoostBuild
.Tester(use_test_config
=False)
11 t
.write("jamroot.jam", """\
12 project : requirements <link>static ;
13 exe a : a.cpp [ lib helper : helper.cpp ] ;
21 t
.write("helper.cpp", "void helper() {}\n")
24 t
.expect_addition("bin/$toolset/debug/link-static*/a__helper.lib")
25 t
.rm("bin/$toolset/debug/link-static/a__helper.lib")
26 t
.rm("bin/$toolset/debug/link-static/*/a__helper.lib")
28 t
.run_build_system(["a__helper"])
29 t
.expect_addition("bin/$toolset/debug/link-static*/a__helper.lib")
34 # Now check that inline targets with the same name but present in different
35 # places are not confused between each other, and with top-level targets.
36 t
.write("jamroot.jam", """\
37 project : requirements <link>static ;
38 exe a : a.cpp [ lib helper : helper.cpp ] ;
39 exe a2 : a.cpp [ lib helper : helper.cpp ] ;
43 t
.expect_addition("bin/$toolset/debug/link-static*/a.exe")
44 t
.expect_addition("bin/$toolset/debug/link-static*/a__helper.lib")
45 t
.expect_addition("bin/$toolset/debug/link-static*/a2__helper.lib")
48 # Check that the 'alias' target does not change the name of inline targets, and
49 # that inline targets are explicit.
50 t
.write("jamroot.jam", """\
51 project : requirements <link>static ;
52 alias a : [ lib helper : helper.cpp ] ;
58 t
.expect_nothing_more()
60 t
.run_build_system(["a"])
61 t
.expect_addition("bin/$toolset/debug/link-static*/helper.lib")