]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/conditionals2.py
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / build / test / conditionals2.py
1 #!/usr/bin/python
2
3 # Copyright 2003 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 # Regression test: it was possible that due to evaluation of conditional
8 # requirements, two different values of non-free features were present in a
9 # property set.
10
11 import BoostBuild
12
13 t = BoostBuild.Tester()
14
15 t.write("a.cpp", "")
16
17 t.write("jamroot.jam", """
18 import feature ;
19 import common ;
20
21 feature.feature the_feature : false true : propagated ;
22
23 rule maker ( targets * : sources * : properties * )
24 {
25 if <the_feature>false in $(properties) &&
26 <the_feature>true in $(properties)
27 {
28 EXIT "Oops, two different values of non-free feature" ;
29 }
30 CMD on $(targets) = [ common.file-creation-command ] ;
31 }
32
33 actions maker
34 {
35 $(CMD) $(<) ;
36 }
37
38 make a : a.cpp : maker : <variant>debug:<the_feature>true ;
39 """)
40
41 t.run_build_system()
42
43 t.cleanup()