2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 00:32:11 +00:00
Files
build/test/unused.py
Jurko Gospodnetić aaa350a78d Boost Build cleanup - minor stylistic changes.
[SVN r79862]
2012-08-04 11:34:31 +00:00

29 lines
854 B
Python

#!/usr/bin/python
# Copyright 2003 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Test that unused sources are at least reported.
import BoostBuild
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 a 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", "int main() {}\n")
t.run_build_system(["-sGENERATE_NOTHING=1"])
t.cleanup()