2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-12 12:02:24 +00:00
Files
build/test/conditionals.py
Vladimir Prus e60af004d1 Add more tests.
[SVN r15851]
2002-10-10 12:12:06 +00:00

29 lines
600 B
Python

#!/usr/bin/python
# Test conditional properties
from BoostBuild import Tester, List
import os
from string import strip
t = Tester()
t.write("project-root.jam", "import gcc ;")
t.write("a.cpp", """
#ifdef SHARED
int main() {}
#endif
""")
t.write("Jamfile", "exe a : a.cpp : <shared>true:<define>SHARED ;")
t.run_build_system("shared=true")
t.expect_addition("bin/gcc/debug/shared-true/main-target-a/a")
t.write("Jamfile", """
project : requirements <shared>true:<define>SHARED ;
exe a : a.cpp ;
""")
t.run_build_system("shared=true")
t.expect_addition("bin/gcc/debug/shared-true/a")
t.cleanup()