3 # Copyright (C) Vladimir Prus 2006.
4 # Distributed under the Boost Software License, Version 1.0. (See
5 # accompanying file LICENSE_1_0.txt or copy at
6 # http://www.boost.org/LICENSE_1_0.txt)
10 t = BoostBuild.Tester(use_test_config=False)
13 t.write("jamroot.jam", """
14 project : requirements <threading>multi <variant>debug:<link>static ;
15 # Force link to be relevant
16 project : requirements <link>shared:<define>TEST_DLL ;
24 t.write("sub/jamfile.jam", """
25 exe hello : hello.cpp : -<threading>multi ;
28 t.write("sub/hello.cpp", """
32 t.write("sub2/jamfile.jam", """
33 project : requirements -<threading>multi ;
34 exe hello : hello.cpp ;
37 t.write("sub2/hello.cpp", """
41 t.write("sub3/hello.cpp", """
45 t.write("sub3/jamfile.jam", """
46 exe hello : hello.cpp : "-<variant>debug:<link>static" ;
49 t.write("sub4/hello.cpp", """
53 t.write("sub4/jamfile.jam", """
54 project : requirements "-<variant>debug:<link>static" ;
55 exe hello : hello.cpp ;
60 t.expect_addition("sub/bin/$toolset/debug*/link-static*/hello.exe")
61 t.expect_addition("sub2/bin/$toolset/debug*/link-static*/hello.exe")
62 t.expect_addition("sub3/bin/$toolset/debug*/threading-multi*/hello.exe")
63 t.expect_addition("sub4/bin/$toolset/debug*/threading-multi*/hello.exe")
67 # Now test that path requirements can be removed as well.
68 t.write("jamroot.jam", """
72 t.write("sub/jamfile.jam", """
73 project : requirements <include>broken ;
74 exe hello : hello.cpp : -<include>broken ;
77 t.write("sub/hello.cpp", """
82 t.write("sub/broken/math.h", """
89 t.expect_addition("sub/bin/$toolset/debug*/hello.exe")