mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 00:32:11 +00:00
* new/targets.jam
(basic-target.check-for-unused-sources): New rule.
(basic-target.generate): Call the above.
* new/virtual-target.jam
(traverse): New arguments 'include-roots' and 'include-sources'.
* test/unused.py: New test.
[SVN r17685]
31 lines
424 B
Python
31 lines
424 B
Python
#!/usr/bin/python
|
|
|
|
# Test that unused sources are at least reported.
|
|
|
|
from BoostBuild import Tester
|
|
from string import find
|
|
t = Tester()
|
|
|
|
t.write("a.h", """
|
|
""")
|
|
|
|
t.write("a.cpp", """
|
|
int main()
|
|
{
|
|
return 0;
|
|
}
|
|
""")
|
|
|
|
t.write("Jamfile", """
|
|
exe a : a.cpp a.h ;
|
|
""")
|
|
|
|
t.write("project-root.jam", """
|
|
""")
|
|
|
|
t.run_build_system()
|
|
t.fail_test(find(t.stdout(), "warning: Unused source target { a.H }") == -1)
|
|
|
|
t.cleanup()
|
|
|