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:
939 bytes
|
Line | |
---|
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 building with optimization brings NDEBUG define, and, more |
---|
8 | # importantly, that dependency targets are built with NDEBUG as well, |
---|
9 | # even if they are not directly requested. |
---|
10 | |
---|
11 | |
---|
12 | from BoostBuild import Tester, List |
---|
13 | |
---|
14 | |
---|
15 | t = Tester() |
---|
16 | |
---|
17 | t.write("project-root.jam", "") |
---|
18 | t.write("Jamfile", """ |
---|
19 | exe hello : hello.cpp lib//lib1 ; |
---|
20 | """) |
---|
21 | t.write("hello.cpp", """ |
---|
22 | #ifdef NDEBUG |
---|
23 | void foo(); |
---|
24 | int main() |
---|
25 | { |
---|
26 | foo(); |
---|
27 | return 0; |
---|
28 | } |
---|
29 | #endif |
---|
30 | """) |
---|
31 | t.write("lib/Jamfile", """ |
---|
32 | lib lib1 : lib1.cpp ; |
---|
33 | """) |
---|
34 | t.write("lib/lib1.cpp", """ |
---|
35 | #ifdef NDEBUG |
---|
36 | void foo() {} |
---|
37 | #endif |
---|
38 | """) |
---|
39 | |
---|
40 | # 'release' builds should get NDEBUG define |
---|
41 | # use static linking to avoid messing with |
---|
42 | # imports/exports on windows. |
---|
43 | t.run_build_system("link=static release") |
---|
44 | |
---|
45 | |
---|
46 | t.cleanup() |
---|
Note: See
TracBrowser
for help on using the repository browser.