Last change
on this file since 29 was
29,
checked in by landauf, 16 years ago
|
updated boost from 1_33_1 to 1_34_1
|
File size:
1.0 KB
|
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 unused sources are at least reported. |
---|
8 | |
---|
9 | from BoostBuild import Tester |
---|
10 | from string import find |
---|
11 | t = Tester() |
---|
12 | |
---|
13 | t.set_tree("unused") |
---|
14 | |
---|
15 | t.run_build_system() |
---|
16 | # The second invocation should do nothing, and produce |
---|
17 | # no warning. The previous invocation might have printed |
---|
18 | # executed actions and other things, so it's not easy |
---|
19 | # to check if warning was issued or not. |
---|
20 | t.run_build_system() |
---|
21 | t.fail_test(find(t.stdout(), "warning: Unused source { b.X } in main target ./a") == -1) |
---|
22 | |
---|
23 | t.run_build_system("-sGENERATE_ONLY_UNUSABLE=1") |
---|
24 | t.fail_test(find(t.stdout(), "warning: Unused source { b.X } in main target ./a") == -1) |
---|
25 | |
---|
26 | # Now check that even if main target generates nothing, its |
---|
27 | # usage requirements are still propagated to dependents. |
---|
28 | t.write("a.cpp",""" |
---|
29 | #ifdef FOO |
---|
30 | int main() {} |
---|
31 | #endif |
---|
32 | """) |
---|
33 | t.run_build_system("-sGENERATE_NOTHING=1") |
---|
34 | |
---|
35 | t.cleanup() |
---|
36 | |
---|
Note: See
TracBrowser
for help on using the repository browser.