]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/source_locations.py
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / build / test / source_locations.py
1 #!/usr/bin/python
2
3 # Copyright (C) Craig Rodrigues 2005.
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 # Test that projects with multiple source-location directories are handled OK.
9
10 import BoostBuild
11
12 t = BoostBuild.Tester(use_test_config=False)
13
14 t.write("jamroot.jam", """
15 path-constant SRC1 : "./src1" ;
16 path-constant SRC2 : "./src2" ;
17 path-constant SRC3 : "./src3" ;
18 path-constant BUILD : "build" ;
19
20 project : requirements <include>$(SRC1)/include <threading>multi
21 : build-dir $(BUILD) ;
22
23 build-project project1 ;
24 """)
25
26 t.write("project1/jamfile.jam", """
27 project project1 : source-location $(SRC1) $(SRC2) $(SRC3) ;
28 SRCS = s1.cpp s2.cpp testfoo.cpp ;
29 exe test : $(SRCS) ;
30 """)
31
32 t.write("src1/s1.cpp", "int main() {}\n")
33 t.write("src2/s2.cpp", "void hello() {}\n")
34 t.write("src3/testfoo.cpp", "void testfoo() {}\n")
35
36 # This file should not be picked up, because "src2" is before "src3" in the list
37 # of source directories.
38 t.write("src3/s2.cpp", "void hello() {}\n")
39
40 t.run_build_system()
41
42 t.cleanup()