⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unused.py

📁 Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work
💻 PY
字号:
#!/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 BoostBuildfrom string import findt = 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()t.fail_test(find(t.stdout(), "warning: Unused source { b.X } in main target ./a") == -1)t.run_build_system("-sGENERATE_ONLY_UNUSABLE=1")t.fail_test(find(t.stdout(), "warning: Unused source { b.X } in main target ./a") == -1)# Now check that even if main target generates nothing, its usage requirements# are still propagated to dependants.t.write("a.cpp", """#ifdef FOOint main() {}#endif""")t.run_build_system("-sGENERATE_NOTHING=1")t.cleanup()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -