Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/implicit_dependency.py @ 32

Last change on this file since 32 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 891 bytes
Line 
1#!/usr/bin/python
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 the <implicit-dependency> is respected even if the
9#  target referred-to is not build itself, but only referred
10#  to by <implicit-dependency>.
11
12from BoostBuild import Tester, List
13import string
14
15t = Tester()
16
17t.write("Jamroot", """
18make a.h : : gen-header ;
19explicit a.h ;
20
21exe hello : hello.cpp : <implicit-dependency>a.h ;
22
23import os ;
24if [ os.name ] = NT
25{
26    actions gen-header
27    {
28       echo int i; > $(<)
29    }
30}
31else
32{
33    actions gen-header
34    {
35        echo "int i;" > $(<)
36    }
37}
38""")
39
40t.write("hello.cpp", """
41#include "a.h"
42
43int main()
44{
45    return i;
46}
47""")
48
49
50
51t.run_build_system()
52
53t.expect_addition("bin/$toolset/debug/hello.exe")
54
55t.cleanup()
56
Note: See TracBrowser for help on using the repository browser.