Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/library_property.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 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.
15from BoostBuild import Tester, List
16
17# Create a temporary working directory
18t = Tester()
19
20t.write("Jamfile", """
21project
22   : requirements <library>lib//x
23   ;
24exe a : a.cpp foo ;
25obj foo : foo.cpp : <variant>release ;
26""")
27
28t.write("a.cpp", """
29void aux();
30int main() { aux(); }
31""")
32
33t.write("foo.cpp", """
34void gee();
35void aux() { gee(); }
36""")
37
38t.write("project-root.jam", """
39""")
40
41t.write("lib/x.cpp", """
42void
43#if defined(_WIN32)
44__declspec(dllexport)
45#endif
46gee() {}
47""")
48
49t.write("lib/Jamfile", """
50lib x : x.cpp ;
51""")
52
53t.write("lib/project-root.jam", """
54""")
55
56
57t.run_build_system()
58t.expect_addition("bin/$toolset/debug/a.exe")
59t.expect_nothing("lib/bin/$toolset/release/x.obj")
60t.cleanup()
61
62
Note: See TracBrowser for help on using the repository browser.