1#!/usr/local/bin/python3.8 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 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() 43