]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/test/remove_requirement.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / remove_requirement.py
CommitLineData
7c673cae
FG
1#!/usr/bin/python
2
3# Copyright (C) Vladimir Prus 2006.
4# Distributed under the Boost Software License, Version 1.0. (See
5# accompanying file LICENSE_1_0.txt or copy at
6# http://www.boost.org/LICENSE_1_0.txt)
7
8import BoostBuild
9
10t = BoostBuild.Tester(use_test_config=False)
11
12
13t.write("jamroot.jam", """
14project : requirements <threading>multi <variant>debug:<link>static ;
15
16build-project sub ;
17build-project sub2 ;
18build-project sub3 ;
19build-project sub4 ;
20""")
21
22t.write("sub/jamfile.jam", """
23exe hello : hello.cpp : -<threading>multi ;
24""")
25
26t.write("sub/hello.cpp", """
27int main() {}
28""")
29
30t.write("sub2/jamfile.jam", """
31project : requirements -<threading>multi ;
32exe hello : hello.cpp ;
33""")
34
35t.write("sub2/hello.cpp", """
36int main() {}
37""")
38
39t.write("sub3/hello.cpp", """
40int main() {}
41""")
42
43t.write("sub3/jamfile.jam", """
44exe hello : hello.cpp : -<variant>debug:<link>static ;
45""")
46
47t.write("sub4/hello.cpp", """
48int main() {}
49""")
50
51t.write("sub4/jamfile.jam", """
52project : requirements -<variant>debug:<link>static ;
53exe hello : hello.cpp ;
54""")
55
56t.run_build_system()
57
b32b8144
FG
58t.expect_addition("sub/bin/$toolset/debug/link-static*/hello.exe")
59t.expect_addition("sub2/bin/$toolset/debug/link-static*/hello.exe")
60t.expect_addition("sub3/bin/$toolset/debug/threading-multi*/hello.exe")
61t.expect_addition("sub4/bin/$toolset/debug/threading-multi*/hello.exe")
7c673cae
FG
62
63t.rm(".")
64
65# Now test that path requirements can be removed as well.
66t.write("jamroot.jam", """
67build-project sub ;
68""")
69
70t.write("sub/jamfile.jam", """
71project : requirements <include>broken ;
72exe hello : hello.cpp : -<include>broken ;
73""")
74
75t.write("sub/hello.cpp", """
76#include "math.h"
77int main() {}
78""")
79
80t.write("sub/broken/math.h", """
81Broken
82""")
83
84
85t.run_build_system()
86
b32b8144 87t.expect_addition("sub/bin/$toolset/debug*/hello.exe")
7c673cae
FG
88
89t.cleanup()