blob: b44320c52eee47e1014272206f824644abb3c4a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/usr/bin/python
# Copyright 2003 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Test that unused sources are at least reported.
import BoostBuild
from string import find
t = BoostBuild.Tester()
t.set_tree("unused")
t.run_build_system()
# The second invocation should do nothing, and produce no warning. The previous
# invocation might have printed executed actions and other things, so it is not
# easy to check if warning was issued or not.
t.run_build_system(stdout="")
t.run_build_system("-sGENERATE_ONLY_UNUSABLE=1", stdout="")
# Now check that even if main target generates nothing, its usage requirements
# are still propagated to dependants.
t.write("a.cpp", """
#ifdef FOO
int main() {}
#endif
""")
t.run_build_system("-sGENERATE_NOTHING=1")
t.cleanup()
|