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