]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/feature_force_include.py
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / test / feature_force_include.py
1 #!/usr/bin/env python
2
3 # Copyright 2020 Nikita Kniazev
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE.txt or copy at
6 # https://www.bfgroup.xyz/b2/LICENSE.txt)
7
8 # Tests the force-include feature
9
10 import BoostBuild
11
12 t = BoostBuild.Tester(use_test_config=False)
13
14 t.write("Jamroot.jam", """
15 obj test-cpp : test.cpp : <force-include>one.h <force-include>two.h ;
16 obj test-c : test.c : <force-include>one.h <force-include>two.h ;
17 """)
18
19 for name in ("test.cpp", "test.c"):
20 t.write(name, """
21 #ifndef ONE
22 #error Cannot compile without ONE
23 #endif
24 #ifndef TWO
25 #error Cannot compile without TWO
26 #endif
27 """)
28
29 t.write("one.h", """
30 #define ONE
31 """)
32
33 t.write("two.h", """
34 #define TWO
35 """)
36
37 t.run_build_system()
38 t.expect_addition("bin/$toolset/debug*/test-cpp.obj")
39 t.expect_addition("bin/$toolset/debug*/test-c.obj")
40
41 t.cleanup()