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