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 | |
---|
11 | from BoostBuild import Tester, List |
---|
12 | |
---|
13 | t = Tester() |
---|
14 | |
---|
15 | # Declare *non-propagated* feature foo. |
---|
16 | t.write("project-root.jam", """ |
---|
17 | import feature : feature ; |
---|
18 | |
---|
19 | feature foo : on off ; |
---|
20 | """) |
---|
21 | |
---|
22 | # Note that '<foo>on' won't be propagated |
---|
23 | # to 'd/l'. |
---|
24 | t.write("Jamfile", """ |
---|
25 | exe hello : hello.cpp d//l ; |
---|
26 | """) |
---|
27 | t.write("hello.cpp", """ |
---|
28 | #ifdef _WIN32 |
---|
29 | __declspec(dllimport) |
---|
30 | #endif |
---|
31 | void foo(); |
---|
32 | int main() |
---|
33 | { |
---|
34 | foo(); |
---|
35 | return 1; |
---|
36 | } |
---|
37 | |
---|
38 | """) |
---|
39 | |
---|
40 | t.write("d/Jamfile", """ |
---|
41 | lib l : l.cpp : <foo>on:<define>FOO ; |
---|
42 | """) |
---|
43 | t.write("d/l.cpp", """ |
---|
44 | #ifdef _WIN32 |
---|
45 | __declspec(dllexport) |
---|
46 | #endif |
---|
47 | #ifdef FOO |
---|
48 | void foo() {} |
---|
49 | #endif |
---|
50 | |
---|
51 | """) |
---|
52 | |
---|
53 | t.run_build_system() |
---|
54 | |
---|
55 | t.expect_addition("bin/$toolset/debug/hello.exe") |
---|
56 | |
---|
57 | t.cleanup() |
---|
Note: See
TracBrowser
for help on using the repository browser.