]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/feature_cxxflags.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / feature_cxxflags.py
1 #!/usr/bin/python
2
3 # Copyright 2014 Steven Watanabe
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE_1_0.txt or copy at
6 # http://www.boost.org/LICENSE_1_0.txt)
7
8 # Tests the cxxflags feature
9
10 import BoostBuild
11
12 t = BoostBuild.Tester(use_test_config=False)
13
14 # cxxflags should be applied to C++ compilation,
15 # but not to C.
16 t.write("Jamroot.jam", """
17 obj test-cpp : test.cpp : <cxxflags>-DOKAY ;
18 obj test-c : test.c : <cxxflags>-DBAD ;
19 """)
20
21 t.write("test.cpp", """
22 #ifndef OKAY
23 #error Cannot compile without OKAY
24 #endif
25 """)
26
27 t.write("test.c", """
28 #ifdef BAD
29 #error Cannot compile with BAD
30 #endif
31 """)
32
33 t.run_build_system()
34 t.expect_addition("bin/$toolset/debug*/test-cpp.obj")
35 t.expect_addition("bin/$toolset/debug*/test-c.obj")
36
37 t.cleanup()