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

📄 build_dir.py

📁 boost库提供标准的C++ API 配合dev c++使用,功能更加强大
💻 PY
字号:
#!/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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -