]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/static_and_shared_library.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / static_and_shared_library.py
1 #!/usr/bin/python
2
3 # Copyright 2002, 2003 Dave Abrahams
4 # Copyright 2002, 2003, 2005 Vladimir Prus
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7
8 import BoostBuild
9
10 t = BoostBuild.Tester(use_test_config=False)
11 t.write("jamroot.jam", "")
12 t.write("lib/c.cpp", "int bar() { return 0; }\n")
13 t.write("lib/jamfile.jam", """\
14 static-lib auxilliary1 : c.cpp ;
15 lib auxilliary2 : c.cpp ;
16 """)
17
18 def reset():
19 t.rm("lib/bin")
20
21 t.run_build_system(subdir='lib')
22 t.expect_addition("lib/bin/$toolset/debug*/" * BoostBuild.List("c.obj "
23 "auxilliary1.lib auxilliary2.dll"))
24 t.expect_nothing_more()
25
26 reset()
27 t.run_build_system(["link=shared"], subdir="lib")
28 t.expect_addition("lib/bin/$toolset/debug*/" * BoostBuild.List("c.obj "
29 "auxilliary1.lib auxilliary2.dll"))
30 t.expect_nothing_more()
31
32 reset()
33 t.run_build_system(["link=static"], subdir="lib")
34 t.expect_addition("lib/bin/$toolset/debug/link-static*/" * BoostBuild.List(
35 "c.obj auxilliary1.lib auxilliary2.lib"))
36 t.expect_nothing_more()
37
38 t.cleanup()