Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/tools/build/v2/test/ndebug.py @ 12

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