]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/preprocessor.py
3 # Copyright 2003 Vladimir Prus
4 # Copyright 2011 Steven Watanabe
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
8 # Test the C/C++ preprocessor.
12 t
= BoostBuild
.Tester()
14 t
.write("jamroot.jam", """
16 preprocessed hello : hello.cpp ;
17 preprocessed a : a.c ;
18 exe hello.exe : hello a : <define>FAIL ;
21 t
.write("hello.cpp", """
23 #error "This file must be compiled as C++"
26 #error "Not preprocessed?"
29 int main() { return foo(); }
33 /* This will not compile unless in C mode. */
35 #error "This file must be compiled as C"
38 #error "Not preprocessed?"
49 t
.expect_addition("bin/$toolset/debug*/hello.ii")
50 t
.expect_addition("bin/$toolset/debug*/a.i")
51 t
.expect_addition("bin/$toolset/debug*/hello.exe")