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 2004 Vladimir Prus |
---|
4 | # Distributed under the Boost Software License, Version 1.0. |
---|
5 | # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) |
---|
6 | |
---|
7 | # Test that the <library> property has no effect on "obj" targets. |
---|
8 | # Previously, it affected all targets, so |
---|
9 | # |
---|
10 | # project : requirements <library>foo ; |
---|
11 | # exe a : a.cpp helper ; |
---|
12 | # obj helper : helper.cpp : <optimization>off ; |
---|
13 | # |
---|
14 | # caused 'foo' to be built with with and without optimization. |
---|
15 | from BoostBuild import Tester, List |
---|
16 | |
---|
17 | # Create a temporary working directory |
---|
18 | t = Tester() |
---|
19 | |
---|
20 | t.write("Jamfile", """ |
---|
21 | project |
---|
22 | : requirements <library>lib//x |
---|
23 | ; |
---|
24 | exe a : a.cpp foo ; |
---|
25 | obj foo : foo.cpp : <variant>release ; |
---|
26 | """) |
---|
27 | |
---|
28 | t.write("a.cpp", """ |
---|
29 | void aux(); |
---|
30 | int main() { aux(); } |
---|
31 | """) |
---|
32 | |
---|
33 | t.write("foo.cpp", """ |
---|
34 | void gee(); |
---|
35 | void aux() { gee(); } |
---|
36 | """) |
---|
37 | |
---|
38 | t.write("project-root.jam", """ |
---|
39 | """) |
---|
40 | |
---|
41 | t.write("lib/x.cpp", """ |
---|
42 | void |
---|
43 | #if defined(_WIN32) |
---|
44 | __declspec(dllexport) |
---|
45 | #endif |
---|
46 | gee() {} |
---|
47 | """) |
---|
48 | |
---|
49 | t.write("lib/Jamfile", """ |
---|
50 | lib x : x.cpp ; |
---|
51 | """) |
---|
52 | |
---|
53 | t.write("lib/project-root.jam", """ |
---|
54 | """) |
---|
55 | |
---|
56 | |
---|
57 | t.run_build_system() |
---|
58 | t.expect_addition("bin/$toolset/debug/a.exe") |
---|
59 | t.expect_nothing("lib/bin/$toolset/release/x.obj") |
---|
60 | t.cleanup() |
---|
61 | |
---|
62 | |
---|
Note: See
TracBrowser
for help on using the repository browser.