]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/test/c_file.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / c_file.py
CommitLineData
7c673cae
FG
1#!/usr/bin/python
2
3# Copyright 2003 Vladimir Prus
4# Distributed under the Boost Software License, Version 1.0.
5# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
6
7# Test that C files are compiled by a C compiler.
8
9import BoostBuild
10
11t = BoostBuild.Tester(use_test_config=False)
12
13t.write("jamroot.jam", """
14project ;
15exe hello : hello.cpp a.c ;
16""")
17
18t.write("hello.cpp", """
19extern "C" int foo();
20int main() { return foo(); }
21""")
22
23t.write("a.c", """
24// This will not compile unless in C mode.
25int foo()
26{
27 int new = 0;
28 new = (new+1)*7;
29 return new;
30}
31""")
32
33t.run_build_system()
b32b8144 34t.expect_addition("bin/$toolset/debug*/hello.exe")
7c673cae
FG
35
36t.cleanup()