]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/test/free_features_request.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / free_features_request.py
CommitLineData
7c673cae
FG
1#!/usr/bin/python
2
3# Copyright (C) Vladimir Prus 2007.
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# Tests that a free feature specified on the command line applies to all
9# targets ever built.
10
11import BoostBuild
12
13t = BoostBuild.Tester(use_test_config=False)
14
15t.write("jamroot.jam", """\
16exe hello : hello.cpp foo ;
17lib foo : foo.cpp ;
18""")
19
20t.write("hello.cpp", """\
21extern void foo();
22#ifdef FOO
23int main() { foo(); }
24#endif
25""")
26
27t.write("foo.cpp", """\
28#ifdef FOO
29#ifdef _WIN32
30__declspec(dllexport)
31#endif
32void foo() {}
33#endif
34""")
35
36# If FOO is not defined when compiling the 'foo' target, we will get a link
37# error at this point.
38t.run_build_system(["hello", "define=FOO"])
39
b32b8144 40t.expect_addition("bin/$toolset/debug*/hello.exe")
7c673cae
FG
41
42t.cleanup()