build_dir.py
来自「boost库提供标准的C++ API 配合dev c++使用,功能更加强大」· Python 代码 · 共 52 行
PY
52 行
#!/usr/bin/python
# Test that we can change build directory using
# the 'build-dir' project attribute.
from BoostBuild import Tester
t = Tester()
# Test that top-level project can affect build dir
t.write("project-root.jam", "import gcc ; ")
t.write("Jamfile", """
project
: build-dir build
;
exe a : a.cpp ;
build-project src ;
""")
t.write("a.cpp", "int main() { return 0; }\n")
t.write("src/Jamfile", "exe b : b.cpp ; ")
t.write("src/b.cpp", "int main() { return 0; }\n")
t.run_build_system()
t.expect_addition(["build/$toolset/debug/a.exe",
"build/src/$toolset/debug/b.exe"])
# Test that building from child projects work
t.run_build_system(subdir='src')
t.expect_nothing_more()
# Test that project can override build dir
t.write("Jamfile", """
exe a : a.cpp ;
build-project src ;
""")
t.write("src/Jamfile", """
project
: build-dir build
;
exe b : b.cpp ;
""")
t.run_build_system()
t.expect_addition(["bin/$toolset/debug/a.exe",
"src/build/$toolset/debug/b.exe"])
t.cleanup()
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?