2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 00:32:11 +00:00
Files
build/test/build_dir.py
Vladimir Prus 022ef577da Implement BB7: now there's "build-dir" project
attribute which controls where generated targets are put,
much in the same was as ALL_LOCATE_TARGET.

* new/virtual-target.jam
    (virtual-target.path): Respect build dir.
    (virtual-target.actualize-location): Don't
       compute path, but call call instead.

* new/project.jam
    (initialize): Set default value for 'build-dir'.
    (project-attributes.set): Handle 'build-dir'.

* new/path.jam
    (relative): New rule.

* test/build_dir.py: New test.


[SVN r16589]
2002-12-11 19:01:50 +00:00

47 lines
895 B
Python

#!/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() {}")
t.write("src/Jamfile", "exe b : b.cpp ; ")
t.write("b.cpp", "int main() {}")
t.run_build_system()
t.expect_addition(["build/bin/gcc/debug/a",
"build/src/bin/gcc/debug/b"])
# 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/gcc/debug/a",
"src/build/bin/gcc/debug/b"])
t.cleanup()