]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/test/direct_request_test.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / direct_request_test.py
CommitLineData
7c673cae
FG
1#!/usr/bin/python
2
3import BoostBuild
4
5t = BoostBuild.Tester(use_test_config=False)
6
7# First check some startup.
8
9t.write("jamroot.jam", "")
10t.write("jamfile.jam", """\
11exe a : a.cpp b ;
12lib b : b.cpp ;
13""")
14
15t.write("a.cpp", """\
16void
17# ifdef _WIN32
18__declspec(dllimport)
19# endif
20foo();
21int main() { foo(); }
22""")
23
24t.write("b.cpp", """\
25#ifdef MACROS
26void
27# ifdef _WIN32
28__declspec(dllexport)
29# endif
30foo() {}
31#endif
32
33# ifdef _WIN32
34int __declspec(dllexport) force_implib_creation;
35# endif
36""")
37
38t.run_build_system(["define=MACROS"])
b32b8144 39t.expect_addition("bin/$toolset/debug*/"
7c673cae
FG
40 * (BoostBuild.List("a.obj b.obj b.dll a.exe")))
41
42
43# When building a debug version, the 'define' still applies.
44t.rm("bin")
45t.run_build_system(["debug", "define=MACROS"])
b32b8144 46t.expect_addition("bin/$toolset/debug*/"
7c673cae
FG
47 * (BoostBuild.List("a.obj b.obj b.dll a.exe")))
48
49
50# When building a release version, the 'define' still applies.
51t.write("jamfile.jam", """\
52exe a : a.cpp b : <variant>debug ;
53lib b : b.cpp ;
54""")
55t.rm("bin")
56t.run_build_system(["release", "define=MACROS"])
57
58
59# Regression test: direct build request was not working when there was more
60# than one level of 'build-project'.
61t.rm(".")
62t.write("jamroot.jam", "")
63t.write("jamfile.jam", "build-project a ;")
64t.write("a/jamfile.jam", "build-project b ;")
65t.write("a/b/jamfile.jam", "")
66t.run_build_system(["release"])
67
68t.cleanup()