Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/ndebug.py @ 32

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
12from BoostBuild import Tester, List
13
14
15t = Tester()
16
17t.write("project-root.jam", "")
18t.write("Jamfile", """
19exe hello : hello.cpp lib//lib1 ;
20""")
21t.write("hello.cpp", """
22#ifdef NDEBUG
23void foo();
24int main()
25{
26    foo();
27    return 0;
28}
29#endif
30""")
31t.write("lib/Jamfile", """
32lib lib1 : lib1.cpp ;       
33""")
34t.write("lib/lib1.cpp", """
35#ifdef NDEBUG
36void 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.
43t.run_build_system("link=static release")
44
45
46t.cleanup()
Note: See TracBrowser for help on using the repository browser.