]> git.proxmox.com Git - ceph.git/blame - 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
CommitLineData
20effc67
TL
1#!/usr/bin/env python
2
3# Copyright 2020 Nikita Kniazev
4# Distributed under the Boost Software License, Version 1.0.
1e59de90
TL
5# (See accompanying file LICENSE.txt or copy at
6# https://www.bfgroup.xyz/b2/LICENSE.txt)
20effc67
TL
7
8# Tests the force-include feature
9
10import BoostBuild
11
12t = BoostBuild.Tester(use_test_config=False)
13
14t.write("Jamroot.jam", """
15obj test-cpp : test.cpp : <force-include>one.h <force-include>two.h ;
16obj test-c : test.c : <force-include>one.h <force-include>two.h ;
17""")
18
19for 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
29t.write("one.h", """
30#define ONE
31""")
32
33t.write("two.h", """
34#define TWO
35""")
36
37t.run_build_system()
38t.expect_addition("bin/$toolset/debug*/test-cpp.obj")
39t.expect_addition("bin/$toolset/debug*/test-c.obj")
40
41t.cleanup()