Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/tools/build/v2/test/c_file.py @ 12

Last change on this file since 12 was 12, checked in by landauf, 18 years ago

added boost

  • Property svn:executable set to *
File size: 820 bytes
Line 
1#!/usr/bin/python
2
3#  Copyright (C) Vladimir Prus 2003. Permission to copy, use, modify, sell and
4#  distribute this software is granted provided this copyright notice appears in
5#  all copies. This software is provided "as is" without express or implied
6#  warranty, and with no claim as to its suitability for any purpose.
7
8#  Test that C files are compiled by C compiler
9from BoostBuild import Tester, List
10
11t = Tester()
12
13t.write("project-root.jam", "")
14t.write("Jamfile", """
15project ;
16
17exe hello : hello.cpp a.c ;
18""")
19t.write("hello.cpp", """
20extern "C" int foo();
21int main() { return foo(); }
22""")
23t.write("a.c", """
24// This won't compile unless in C mode
25int foo()
26{
27    int new = 0;
28    new = (new+1)*7;
29    return new;
30}
31""")
32t.run_build_system()
33t.expect_addition("bin/$toolset/debug/hello.exe")
34
35t.cleanup()
Note: See TracBrowser for help on using the repository browser.