2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 12:42:11 +00:00
Files
build/test/default_build.py
Vladimir Prus cccd2cec60 Add (now disabled) test for BB10.
[SVN r17008]
2003-01-23 14:24:53 +00:00

49 lines
997 B
Python

#!/usr/bin/python
# Test that default build clause actually has any effect.
from BoostBuild import Tester, exe_suffix
t = Tester()
t.write("project-root.jam", "import gcc ;")
t.write("Jamfile", "exe a : a.cpp : : debug release ;")
t.write("a.cpp", "int main() {}\n")
t.run_build_system()
t.expect_addition("bin/gcc/debug/a"+exe_suffix)
t.expect_addition("bin/gcc/release/a"+exe_suffix)
# Now try a harder example: default build which contains <define>
# should cause <define> to be present when "b" is compiled.
# This happens only of "build-project b" is placed first.
t.write("Jamfile", """
project
: default-build <define>FOO
;
build-project a ;
build-project b ;
""")
t.write("a/Jamfile", """
exe a : a.cpp ../b/b ;
""")
t.write("a/a.cpp", """
void foo();
int main() { foo(); }
""")
t.write("b/Jamfile", """
lib b : b.cpp ;
""")
t.write("b/b.cpp", """
#ifdef FOO
void foo() {}
#endif
""")
# Uncomment when BB10 is resolved.
#t.run_build_system()
t.cleanup()