1#!/usr/local/bin/python3.8
2
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)
7
8# Test that it is possible to add a suffix to a main target name to disambiguate
9# that main target from another, and that this does not affect the names of the
10# generated targets.
11
12import BoostBuild
13
14t = BoostBuild.Tester(use_test_config=False)
15
16t.write("jamroot.jam", """
17exe hello.exe : hello.obj ;
18obj hello.obj : hello.cpp : <variant>debug ;
19obj hello.obj2 : hello.cpp : <variant>release ;
20""")
21
22t.write("hello.cpp", """
23int main() {}
24""")
25
26t.run_build_system()
27
28t.expect_addition("bin/$toolset/debug*/hello.exe")
29t.expect_addition("bin/$toolset/debug*/hello.obj")
30t.expect_addition("bin/$toolset/release*/hello.obj")
31
32t.cleanup()
33