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 |
---|
9 | from BoostBuild import Tester, List |
---|
10 | |
---|
11 | t = Tester() |
---|
12 | |
---|
13 | t.write("project-root.jam", "") |
---|
14 | t.write("Jamfile", """ |
---|
15 | project ; |
---|
16 | |
---|
17 | exe hello : hello.cpp a.c ; |
---|
18 | """) |
---|
19 | t.write("hello.cpp", """ |
---|
20 | extern "C" int foo(); |
---|
21 | int main() { return foo(); } |
---|
22 | """) |
---|
23 | t.write("a.c", """ |
---|
24 | // This won't compile unless in C mode |
---|
25 | int foo() |
---|
26 | { |
---|
27 | int new = 0; |
---|
28 | new = (new+1)*7; |
---|
29 | return new; |
---|
30 | } |
---|
31 | """) |
---|
32 | t.run_build_system() |
---|
33 | t.expect_addition("bin/$toolset/debug/hello.exe") |
---|
34 | |
---|
35 | t.cleanup() |
---|
Note: See
TracBrowser
for help on using the repository browser.