1# Boost Chrono Library test Jamfile 2 3# Copyright Beman Dawes 2008 4# Copyright Vicente J. Botet Escriba 2009-2010 5 6# Distributed under the Boost Software License, Version 1.0. 7# See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt 8 9# See library home page at http://www.boost.org/libs/chrono 10 11import os ; 12import feature ; 13 14project 15 : requirements 16 <target-os>freebsd:<linkflags>"-lrt" 17 <target-os>linux:<linkflags>"-lrt" 18 <toolset>pgi:<linkflags>"-lrt" 19 #<threading>single:<define>BOOST_CHRONO_THREAD_DISABLED 20 <toolset>msvc:<asynch-exceptions>on 21 <define>BOOST_CHRONO_USES_MPL_ASSERT 22 <toolset>sun:<define>BOOST_TYPEOF_EMULATION 23 <warnings>all 24 <toolset>gcc:<cxxflags>-Wextra 25 <toolset>gcc:<cxxflags>-pedantic 26 <toolset>gcc:<cxxflags>-Wno-long-long 27 <toolset>darwin:<cxxflags>-Wextra 28 <toolset>darwin:<cxxflags>-pedantic 29 <toolset>darwin:<cxxflags>-Wno-long-long 30 #<toolset>pathscale:<cxxflags>-Wextra 31 <toolset>pathscale:<cxxflags>-Wno-long-long 32 <toolset>pathscale:<cxxflags>-pedantic 33 <toolset>clang:<cxxflags>-Wextra 34 <toolset>clang:<cxxflags>-pedantic 35 <toolset>clang:<cxxflags>-Wno-long-long 36 <toolset>gcc-4.5.0,<target-os>windows:<cxxflags>-Wno-missing-field-initializers 37 <toolset>gcc-4.5.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option 38 <toolset>msvc:<cxxflags>/wd4127 39# Note: Some of the remarks from the Intel compiler are disabled 40# remark #304: access control not specified ("public" by default) 41# remark #383: value copied to temporary, reference to temporary used 42# remark #1418: external function definition with no prior declaration 43 <toolset>intel:<cxxflags>-wd304,383,1418 44 <define>BOOST_CHRONO_VERSION=2 45 ; 46 47rule chrono-run ( sources ) 48{ 49 return 50 [ run $(sources) ../build//boost_chrono 51 : : 52 : 53 : $(sources[1]:B)_shared ] 54 [ run $(sources) ../build//boost_chrono/<link>static 55 : : 56 : 57 : $(sources[1]:B)_static ] 58 [ run $(sources) 59 : : 60 : <define>BOOST_CHRONO_HEADER_ONLY 61 : $(sources[1]:B)_header ] 62 ; 63} 64rule chrono-run2 ( sources : name ) 65{ 66 return 67 [ run $(sources) ../build//boost_chrono 68 : : 69 : 70 : $(name)_shared ] 71 [ run $(sources) ../build//boost_chrono/<link>static 72 : : 73 : 74 : $(name)_static ] 75 [ run $(sources) 76 : : 77 : <define>BOOST_CHRONO_HEADER_ONLY 78 : $(name)_header ] 79 ; 80} 81 82 83rule chrono-run-mt ( sources ) 84{ 85 return 86 [ run $(sources) ../build//boost_chrono 87 : : 88 : 89 : $(sources[1]:B)_shared ] 90 [ run $(sources) ../build//boost_chrono/<link>static 91 : : 92 : 93 : $(sources[1]:B)_static ] 94 [ run $(sources) 95 : : 96 : <define>BOOST_CHRONO_HEADER_ONLY 97 : $(sources[1]:B)_header ] 98 ; 99} 100rule chrono-run2-mt ( sources : name ) 101{ 102 return 103 [ run $(sources) ../build//boost_chrono 104 : : 105 : 106 <library>/boost/system//boost_system 107 : $(name)_shared ] 108 [ run $(sources) ../build//boost_chrono/<link>static 109 : : 110 : 111 <library>/boost/system//boost_system 112 : $(name)_static ] 113 [ run $(sources) 114 : : 115 : <define>BOOST_CHRONO_HEADER_ONLY 116 : $(name)_header ] 117 ; 118} 119rule chrono-compile ( sources ) 120{ 121 return 122 [ compile $(sources) 123 : 124 : $(sources[1]:B)_lib ] 125 [ compile $(sources) 126 : <define>BOOST_CHRONO_HEADER_ONLY 127 : $(sources[1]:B)_header ] 128 ; 129} 130 131rule chrono-compile2 ( sources : name ) 132{ 133 return 134 [ compile $(sources) 135 : 136 : $(name)_lib ] 137 [ compile $(sources) 138 : <define>BOOST_CHRONO_HEADER_ONLY 139 : $(name)_header ] 140 ; 141} 142 143 test-suite "perf" 144 : 145 [ chrono-run store_now_in_vector.cpp ] 146 ; 147 148