Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/source_locations.py @ 32

Last change on this file since 32 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 1.2 KB
Line 
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
10from BoostBuild import Tester
11t = Tester()
12
13t.write("Jamroot", """
14path-constant SRC1  : "./src1" ;
15path-constant SRC2  : "./src2" ;
16path-constant SRC3  : "./src3" ;
17path-constant BUILD : "build" ;
18
19project
20        : requirements
21                <include>$(SRC1)/include
22                <threading>multi
23        : build-dir $(BUILD)
24        ;
25
26build-project project1 ;
27
28""")
29t.write("project1/Jamfile", """
30project project1
31        : source-location $(SRC1)
32          $(SRC2)
33          $(SRC3)
34        ;
35
36SRCS =  s1.cpp
37        s2.cpp
38        testfoo.cpp
39        ;
40exe test : $(SRCS) ;
41""")
42
43t.write("src1/s1.cpp", "int main() { return 0; }\n")
44t.write("src2/s2.cpp", "void hello() {}\n")
45t.write("src3/testfoo.cpp", "void testfoo() {}\n")
46
47# This file should not be picked up, because "src2" is before
48# "src3" in the list of source directories.
49t.write("src3/s2.cpp", "void hello() {}\n")
50
51t.run_build_system()
52
53t.cleanup()
Note: See TracBrowser for help on using the repository browser.