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