]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/lib_source_property.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / lib_source_property.py
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
8 # Regression test: if a library had no explicit sources, but only <source>
9 # properties, it was built as if it were a searched library, and the specified
10 # sources were not compiled.
11
12 import BoostBuild
13
14 t = BoostBuild.Tester(use_test_config=False)
15
16 t.write("jamroot.jam", """
17 lib a : : <source>a.cpp ;
18 """)
19
20 t.write("a.cpp", """
21 #ifdef _WIN32
22 __declspec(dllexport)
23 #endif
24 void foo() {}
25 """)
26
27 t.run_build_system()
28 t.expect_addition("bin/$toolset/debug*/a.obj")
29
30 t.rm("bin")
31
32
33 # Now try with <conditional>.
34 t.write("jamroot.jam", """
35 rule test ( properties * )
36 {
37 return <source>a.cpp ;
38 }
39 lib a : : <conditional>@test ;
40 """)
41
42 t.run_build_system()
43 t.expect_addition("bin/$toolset/debug*/a.obj")
44
45 t.cleanup()