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.3 KB
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
3 | # Copyright 2003 Dave Abrahams |
---|
4 | # Copyright 2002, 2003 Vladimir Prus |
---|
5 | # Distributed under the Boost Software License, Version 1.0. |
---|
6 | # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) |
---|
7 | |
---|
8 | # This tests that |
---|
9 | # 1) the 'make' correctly assigns types to produced targets |
---|
10 | # 2) than if 'make' create targets of type CPP, they are |
---|
11 | # correctly used (there was a bug with it). |
---|
12 | |
---|
13 | from BoostBuild import Tester |
---|
14 | t = Tester() |
---|
15 | |
---|
16 | # In order to correctly link this app, 'b.cpp', created by 'make' |
---|
17 | # rule, should be compiled. |
---|
18 | t.write("project-root.jam", "import gcc ;") |
---|
19 | t.write("Jamfile", r''' |
---|
20 | rule create ( dst : src * : properties * ) |
---|
21 | { |
---|
22 | # hack to echo a space under NT |
---|
23 | setup on $(dst) = "set x=int main(){ return 0; }" ; |
---|
24 | } |
---|
25 | |
---|
26 | import modules ; |
---|
27 | if [ modules.peek : NT ] |
---|
28 | { |
---|
29 | actions create |
---|
30 | { |
---|
31 | $(setup) |
---|
32 | echo %x% > $(<) |
---|
33 | } |
---|
34 | } |
---|
35 | else |
---|
36 | { |
---|
37 | actions create |
---|
38 | { |
---|
39 | echo "int main(){ return 0; }" > $(<) |
---|
40 | } |
---|
41 | } |
---|
42 | |
---|
43 | IMPORT $(__name__) : create : : create ; |
---|
44 | |
---|
45 | exe a : l dummy.cpp ; |
---|
46 | |
---|
47 | # needs to be static lib for Windows - main cannot appear in DLL |
---|
48 | static-lib l : a.cpp b.cpp ; |
---|
49 | |
---|
50 | make b.cpp : : create ; |
---|
51 | |
---|
52 | ''') |
---|
53 | t.write("a.cpp", "") |
---|
54 | t.write("dummy.cpp", "// msvc needs at least one object file\n") |
---|
55 | |
---|
56 | t.run_build_system() |
---|
57 | |
---|
58 | t.expect_addition("bin/$toolset/debug/a.exe") |
---|
59 | |
---|
60 | t.cleanup() |
---|
Note: See
TracBrowser
for help on using the repository browser.