]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/explicit.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / explicit.py
1 #!/usr/bin/python
2
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)
6
7 import BoostBuild
8
9 t = BoostBuild.Tester(use_test_config=False)
10
11 t.write("jamroot.jam", """\
12 exe hello : hello.cpp ;
13 exe hello2 : hello.cpp ;
14 explicit hello2 ;
15 """)
16
17 t.write("hello.cpp", "int main() {}\n")
18
19 t.run_build_system()
20 t.ignore("*.tds")
21 t.expect_addition(BoostBuild.List("bin/$toolset/debug*/hello") * \
22 [".exe", ".obj"])
23 t.expect_nothing_more()
24
25 t.run_build_system(["hello2"])
26 t.expect_addition("bin/$toolset/debug*/hello2.exe")
27
28 t.rm(".")
29
30
31 # Test that 'explicit' used in a helper rule applies to the current project, and
32 # not to the Jamfile where the helper rule is defined.
33 t.write("jamroot.jam", """\
34 rule myinstall ( name : target )
35 {
36 install $(name)-bin : $(target) ;
37 explicit $(name)-bin ;
38 alias $(name) : $(name)-bin ;
39 }
40 """)
41
42 t.write("sub/a.cpp", "\n")
43 t.write("sub/jamfile.jam", "myinstall dist : a.cpp ;")
44
45 t.run_build_system(subdir="sub")
46 t.expect_addition("sub/dist-bin/a.cpp")
47
48 t.rm("sub/dist-bin")
49
50 t.write("sub/jamfile.jam", """\
51 myinstall dist : a.cpp ;
52 explicit dist ;
53 """)
54
55 t.run_build_system(subdir="sub")
56 t.expect_nothing_more()
57
58 t.cleanup()