Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/default_features.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: 972 bytes
Line 
1#!/usr/bin/python
2
3# Copyright 2003 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 features with default values are always present
8#  in build properties of any target.
9
10from BoostBuild import Tester, List
11
12t = Tester()
13
14# Declare *non-propagated* feature foo.
15t.write("project-root.jam", """
16import feature : feature ;
17
18feature foo : on off ;
19""")
20
21# Note that '<foo>on' won't be propagated
22# to 'd/l'.
23t.write("Jamfile", """
24exe hello : hello.cpp d//l ;
25""")
26t.write("hello.cpp", """
27#ifdef _WIN32
28__declspec(dllimport)
29#endif
30void foo();
31int main()
32{
33   foo();
34   return 1;
35}
36
37""")
38
39t.write("d/Jamfile", """
40lib l : l.cpp : <foo>on:<define>FOO ;
41""")
42t.write("d/l.cpp", """
43#ifdef _WIN32
44__declspec(dllexport)
45#endif
46#ifdef FOO
47void foo() {}
48#endif
49
50""")
51
52t.run_build_system()
53
54t.expect_addition("bin/$toolset/debug/hello.exe")
55
56t.cleanup()
Note: See TracBrowser for help on using the repository browser.