]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/test/source_locations.py
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / test / source_locations.py
CommitLineData
7c673cae
FG
1#!/usr/bin/python
2
3# Copyright (C) Craig Rodrigues 2005.
4# Distributed under the Boost Software License, Version 1.0. (See
1e59de90
TL
5# accompanying file LICENSE.txt or copy at
6# https://www.bfgroup.xyz/b2/LICENSE.txt)
7c673cae
FG
7
8# Test that projects with multiple source-location directories are handled OK.
9
10import BoostBuild
11
12t = BoostBuild.Tester(use_test_config=False)
13
14t.write("jamroot.jam", """
15path-constant SRC1 : "./src1" ;
16path-constant SRC2 : "./src2" ;
17path-constant SRC3 : "./src3" ;
18path-constant BUILD : "build" ;
19
20project : requirements <include>$(SRC1)/include <threading>multi
21 : build-dir $(BUILD) ;
22
23build-project project1 ;
24""")
25
26t.write("project1/jamfile.jam", """
27project project1 : source-location $(SRC1) $(SRC2) $(SRC3) ;
28SRCS = s1.cpp s2.cpp testfoo.cpp ;
29exe test : $(SRCS) ;
30""")
31
32t.write("src1/s1.cpp", "int main() {}\n")
33t.write("src2/s2.cpp", "void hello() {}\n")
34t.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.
38t.write("src3/s2.cpp", "void hello() {}\n")
39
40t.run_build_system()
41
42t.cleanup()