]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/test/library_property.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / library_property.py
CommitLineData
7c673cae
FG
1#!/usr/bin/python
2
3# Copyright 2004 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# Test that the <library> property has no effect on "obj" targets. Previously,
8# it affected all targets, so
9#
10# project : requirements <library>foo ;
11# exe a : a.cpp helper ;
12# obj helper : helper.cpp : <optimization>off ;
13#
14# caused 'foo' to be built with and without optimization.
15
16import BoostBuild
17
18t = BoostBuild.Tester(use_test_config=False)
19
20t.write("jamroot.jam", """
21project : requirements <library>lib//x ;
22exe a : a.cpp foo ;
23obj foo : foo.cpp : <variant>release ;
24""")
25
26t.write("a.cpp", """
27void aux();
28int main() { aux(); }
29""")
30
31t.write("foo.cpp", """
32void gee();
33void aux() { gee(); }
34""")
35
36t.write("lib/x.cpp", """
37void
38#if defined(_WIN32)
39__declspec(dllexport)
40#endif
41gee() {}
42""")
43
44t.write("lib/jamfile.jam", """
45lib x : x.cpp ;
46""")
47
48t.write("lib/jamroot.jam", """
49""")
50
51
52t.run_build_system()
b32b8144 53t.expect_addition("bin/$toolset/debug*/a.exe")
7c673cae
FG
54t.expect_nothing("lib/bin/$toolset/release/x.obj")
55
56t.cleanup()