Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/tools/build/v2/test/default_features.py @ 12

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#  Copyright (C) Vladimir Prus 2003. Permission to copy, use, modify, sell and
4#  distribute this software is granted provided this copyright notice appears in
5#  all copies. This software is provided "as is" without express or implied
6#  warranty, and with no claim as to its suitability for any purpose.
7
8#  Test that features with default values are always present
9#  in build properties of any target.
10
11from BoostBuild import Tester, List
12
13t = Tester()
14
15# Declare *non-propagated* feature foo.
16t.write("project-root.jam", """
17import feature : feature ;
18
19feature foo : on off ;
20""")
21
22# Note that '<foo>on' won't be propagated
23# to 'd/l'.
24t.write("Jamfile", """
25exe hello : hello.cpp d//l ;
26""")
27t.write("hello.cpp", """
28#ifdef _WIN32
29__declspec(dllimport)
30#endif
31void foo();
32int main()
33{
34   foo();
35   return 1;
36}
37
38""")
39
40t.write("d/Jamfile", """
41lib l : l.cpp : <foo>on:<define>FOO ;
42""")
43t.write("d/l.cpp", """
44#ifdef _WIN32
45__declspec(dllexport)
46#endif
47#ifdef FOO
48void foo() {}
49#endif
50
51""")
52
53t.run_build_system()
54
55t.expect_addition("bin/$toolset/debug/hello.exe")
56
57t.cleanup()
Note: See TracBrowser for help on using the repository browser.