1#!/usr/local/bin/python3.8 2 3# Copyright 2003 Dave Abrahams 4# Copyright 2002, 2003, 2004 Vladimir Prus 5# Distributed under the Boost Software License, Version 1.0. 6# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 7 8import BoostBuild 9 10t = BoostBuild.Tester(translate_suffixes=0) 11 12 13t.set_tree("project-test4") 14 15t.run_build_system() 16 17t.expect_addition("bin/$toolset/debug*/a.obj") 18t.expect_content("bin/$toolset/debug*/a.obj", 19"""$toolset/debug*/include-everything* 20a.cpp 21""") 22 23t.expect_addition("bin/$toolset/debug*/a.exe") 24t.expect_content("bin/$toolset/debug*/a.exe", 25"$toolset/debug*/include-everything*\n" + 26"bin/$toolset/debug*/a.obj lib/bin/$toolset/debug/optimization-speed*/b.obj\n" 27) 28 29t.expect_addition("lib/bin/$toolset/debug/optimization-speed*/b.obj") 30t.expect_content("lib/bin/$toolset/debug/optimization-speed*/b.obj", 31"""$toolset/debug/include-everything/optimization-speed* 32lib/b.cpp 33""") 34 35t.expect_addition("bin/$toolset/debug*/b.exe") 36t.expect_content("bin/$toolset/debug*/b.exe", 37"$toolset/debug/define-MACROS/include-everything*\n" + 38"bin/$toolset/debug*/a.obj\n" 39) 40 41t.copy("lib/jamfile3.jam", "lib/jamfile.jam") 42 43# Link-compatibility check for rtti is disabled... 44#t.run_build_system(status=None) 45#import string 46#t.fail_test(t.stdout().find( 47#"""warning: targets produced from b.obj are link incompatible 48#warning: with main target a.exe""") !=-0) 49 50# Test that if we specified composite property in target reference, everything 51# works OK. 52 53t.copy("lib/jamfile1.jam", "lib/jamfile.jam") 54t.copy("jamfile5.jam", "jamfile.jam") 55 56t.run_build_system() 57 58t.expect_addition("lib/bin/$toolset/release*/b.obj") 59 60t.expect_content("bin/$toolset/debug*/a.exe", 61"$toolset/debug/include-everything*\n" + 62"bin/$toolset/debug*/a.obj lib/bin/$toolset/release*/b.obj\n" 63) 64 65t.cleanup() 66