• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# copyright John Maddock 2012
2# Distributed under the Boost Software License, Version 1.0.
3# (See accompanying file LICENSE_1_0.txt or copy at
4# http://www.boost.org/LICENSE_1_0.txt.
5
6import modules ;
7import path ;
8import ../../config/checks/config : requires ;
9
10local ntl-path = [ modules.peek : NTL_PATH ] ;
11local gmp_path = [ modules.peek : GMP_PATH ] ;
12local mpfr_path = [ modules.peek : MPFR_PATH ] ;
13local tommath_path = [ modules.peek : TOMMATH_PATH ] ;
14
15project : requirements
16   <target-os>freebsd:<linkflags>"-lrt"
17   <target-os>linux:<linkflags>"-lrt"
18   <toolset>pgi:<linkflags>"-lrt"
19   <include>$(gmp_path)
20   <include>$(gmp_path)/mpfr
21   <include>$(gmp_path)/gmpfrxx
22   <include>$(mpfr_path)
23   <include>$(tommath_path)
24   <include>../../..
25   <search>$(gmp_path)
26   <search>$(mpfr_path)
27   <search>$(mpfr_path)/build.vc10/lib/Win32/Debug
28   <search>$(tommath_path)
29   # We set these to make it easier to set up and test GMP and MPFR under Win32:
30   <toolset>msvc:<runtime-link>static
31   <toolset>msvc:<link>static
32   <toolset>intel-win:<runtime-link>static
33   <toolset>intel-win:<link>static
34   <define>BOOST_ALL_NO_LIB
35   <debug-symbols>off
36   <define>NDEBUG=1
37   ;
38
39
40lib gmp ;
41lib mpfr ;
42lib quadmath ;
43lib f2c ;
44
45if $(tommath_path)
46{
47   TOMMATH = [ GLOB $(tommath_path) : *.c ] ;
48}
49else
50{
51   lib tommath ;
52   TOMMATH = tommath ;
53}
54
55test-suite performance :
56
57[ exe performance_test : performance_test.cpp
58            performance_test_files/test01.cpp  performance_test_files/test18.cpp  performance_test_files/test35.cpp
59            performance_test_files/test02.cpp  performance_test_files/test19.cpp  performance_test_files/test36.cpp
60            performance_test_files/test03.cpp  performance_test_files/test20.cpp  performance_test_files/test37.cpp
61            performance_test_files/test04.cpp  performance_test_files/test21.cpp  performance_test_files/test38.cpp
62            performance_test_files/test05.cpp  performance_test_files/test22.cpp  performance_test_files/test39.cpp
63            performance_test_files/test06.cpp  performance_test_files/test23.cpp  performance_test_files/test40.cpp
64            performance_test_files/test07.cpp  performance_test_files/test24.cpp  performance_test_files/test41.cpp
65            performance_test_files/test08.cpp  performance_test_files/test25.cpp  performance_test_files/test42.cpp
66            performance_test_files/test09.cpp  performance_test_files/test26.cpp  performance_test_files/test43.cpp
67            performance_test_files/test10.cpp  performance_test_files/test27.cpp  performance_test_files/test44.cpp
68            performance_test_files/test11.cpp  performance_test_files/test28.cpp  performance_test_files/test45.cpp
69            performance_test_files/test12.cpp  performance_test_files/test29.cpp  performance_test_files/test46.cpp
70            performance_test_files/test13.cpp  performance_test_files/test30.cpp  performance_test_files/test47.cpp
71            performance_test_files/test14.cpp  performance_test_files/test31.cpp  performance_test_files/test48.cpp
72            performance_test_files/test15.cpp  performance_test_files/test32.cpp  performance_test_files/test49.cpp
73            performance_test_files/test16.cpp  performance_test_files/test33.cpp  performance_test_files/test50.cpp
74            performance_test_files/test17.cpp  performance_test_files/test34.cpp  performance_test_files/test51.cpp
75            /boost/system//boost_system
76          : release
77          [ check-target-builds ../config//has_gmp : <define>TEST_MPF <define>TEST_MPZ <define>TEST_MPQ <source>gmp : ]
78          [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr : ]
79          [ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>$(TOMMATH) : ]
80          <define>TEST_CPP_DEC_FLOAT
81          <define>TEST_CPP_BIN_FLOAT
82          <define>TEST_CPP_INT
83          <define>TEST_CPP_INT_RATIONAL
84          <define>TEST_MUL_ONLY
85          [ requires cxx11_auto_declarations cxx11_allocator ]
86          ]
87
88[ exe miller_rabin_performance : miller_rabin_performance.cpp
89            miller_rabin_performance_files/test01.cpp  miller_rabin_performance_files/test07.cpp
90            miller_rabin_performance_files/test02.cpp  miller_rabin_performance_files/test08.cpp
91            miller_rabin_performance_files/test03.cpp  miller_rabin_performance_files/test09.cpp
92            miller_rabin_performance_files/test04.cpp  miller_rabin_performance_files/test10.cpp
93            miller_rabin_performance_files/test05.cpp  miller_rabin_performance_files/test11.cpp
94            miller_rabin_performance_files/test06.cpp  miller_rabin_performance_files/test12.cpp
95            /boost/system//boost_system /boost/chrono//boost_chrono
96          : release
97          [ check-target-builds ../config//has_gmp : <define>TEST_MPF <define>TEST_MPZ <source>gmp : ]
98          [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr : ]
99          [ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>$(TOMMATH) : ]
100          <define>TEST_CPP_DEC_FLOAT
101          <define>TEST_CPP_INT
102          ]
103
104[ exe sf_performance : sf_performance.cpp sf_performance_basic.cpp sf_performance_bessel.cpp
105                     sf_performance_nct.cpp sf_performance_poly.cpp
106                     sf_performance_files/sf_performance_basic_1.cpp    sf_performance_files/sf_performance_nct_06.cpp
107                     sf_performance_files/sf_performance_basic_2.cpp    sf_performance_files/sf_performance_nct_07.cpp
108                     sf_performance_files/sf_performance_basic_3.cpp    sf_performance_files/sf_performance_nct_08.cpp
109                     sf_performance_files/sf_performance_basic_4.cpp    sf_performance_files/sf_performance_nct_09.cpp
110                     sf_performance_files/sf_performance_basic_5.cpp    sf_performance_files/sf_performance_nct_10.cpp
111                     sf_performance_files/sf_performance_basic_6.cpp    sf_performance_files/sf_performance_nct_11.cpp
112                     sf_performance_files/sf_performance_basic_7.cpp    sf_performance_files/sf_performance_nct_12.cpp
113                     sf_performance_files/sf_performance_basic_8.cpp    sf_performance_files/sf_performance_nct_13.cpp
114                     sf_performance_files/sf_performance_basic_9.cpp    sf_performance_files/sf_performance_nct_14.cpp
115                     sf_performance_files/sf_performance_bessel_01.cpp  sf_performance_files/sf_performance_nct_15.cpp
116                     sf_performance_files/sf_performance_bessel_02.cpp  sf_performance_files/sf_performance_nct_16.cpp
117                     sf_performance_files/sf_performance_bessel_03.cpp  sf_performance_files/sf_performance_nct_17.cpp
118                     sf_performance_files/sf_performance_bessel_04.cpp  sf_performance_files/sf_performance_nct_18.cpp
119                     sf_performance_files/sf_performance_bessel_05.cpp  sf_performance_files/sf_performance_nct_19.cpp
120                     sf_performance_files/sf_performance_bessel_06.cpp  sf_performance_files/sf_performance_nct_20.cpp
121                     sf_performance_files/sf_performance_bessel_07.cpp  sf_performance_files/sf_performance_poly_01.cpp
122                     sf_performance_files/sf_performance_bessel_08.cpp  sf_performance_files/sf_performance_poly_02.cpp
123                     sf_performance_files/sf_performance_bessel_09.cpp  sf_performance_files/sf_performance_poly_03.cpp
124                     sf_performance_files/sf_performance_bessel_10.cpp  sf_performance_files/sf_performance_poly_04.cpp
125                     sf_performance_files/sf_performance_bessel_11.cpp  sf_performance_files/sf_performance_poly_05.cpp
126                     sf_performance_files/sf_performance_bessel_12.cpp  sf_performance_files/sf_performance_poly_06.cpp
127                     sf_performance_files/sf_performance_bessel_13.cpp  sf_performance_files/sf_performance_poly_07.cpp
128                     sf_performance_files/sf_performance_bessel_14.cpp  sf_performance_files/sf_performance_poly_08.cpp
129                     sf_performance_files/sf_performance_bessel_15.cpp  sf_performance_files/sf_performance_poly_09.cpp
130                     sf_performance_files/sf_performance_bessel_16.cpp  sf_performance_files/sf_performance_poly_10.cpp
131                     sf_performance_files/sf_performance_bessel_17.cpp  sf_performance_files/sf_performance_poly_11.cpp
132                     sf_performance_files/sf_performance_bessel_18.cpp  sf_performance_files/sf_performance_poly_12.cpp
133                     sf_performance_files/sf_performance_bessel_19.cpp  sf_performance_files/sf_performance_poly_13.cpp
134                     sf_performance_files/sf_performance_nct_01.cpp     sf_performance_files/sf_performance_poly_14.cpp
135                     sf_performance_files/sf_performance_nct_02.cpp     sf_performance_files/sf_performance_poly_15.cpp
136                     sf_performance_files/sf_performance_nct_03.cpp     sf_performance_files/sf_performance_poly_16.cpp
137                     sf_performance_files/sf_performance_nct_04.cpp     sf_performance_files/sf_performance_poly_17.cpp
138                     sf_performance_files/sf_performance_nct_05.cpp     sf_performance_files/sf_performance_poly_18.cpp
139                     /boost/system//boost_system /boost/chrono//boost_chrono /boost/thread//boost_thread
140          : release
141          [ check-target-builds ../config//has_gmp : <define>TEST_MPF <define>TEST_MPZ <source>gmp : ]
142          [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr : ]
143          [ check-target-builds ../config//has_float128 : <source>quadmath : ]
144          <define>TEST_CPP_DEC_FLOAT
145          <define>TEST_CPP_BIN_FLOAT
146          <define>TEST_FLOAT
147          <toolset>msvc:<cxxflags>-bigobj
148          [ requires cxx11_auto_declarations cxx11_allocator ]
149          ]
150
151[ exe delaunay_test : delaunay_test.cpp /boost/system//boost_system /boost/chrono//boost_chrono ]
152
153[ exe voronoi_performance : voronoi_performance.cpp /boost/system//boost_system /boost/chrono//boost_chrono
154   : release
155          [ check-target-builds ../config//has_gmp : <define>TEST_GMP <source>gmp : ]
156          [ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>$(TOMMATH) : ]
157   ]
158
159[ obj obj_linpack_benchmark_mpfr : linpack-benchmark.cpp
160          : release
161          [ check-target-builds ../config//has_mpfr : : <build>no ]
162          <define>TEST_MPFR_50
163          [ check-target-builds ../config//has_f2c : : <build>no ]
164          ]
165
166[ obj obj_linpack_benchmark_mpf : linpack-benchmark.cpp
167          : release
168          [ check-target-builds ../config//has_gmp : : <build>no ]
169          <define>TEST_MPF_50
170          [ check-target-builds ../config//has_f2c : : <build>no ]
171          ]
172
173[ obj obj_linpack_benchmark_cpp_float : linpack-benchmark.cpp
174          : release
175          <define>TEST_CPP_DEC_FLOAT
176          [ check-target-builds ../config//has_f2c : : <build>no ]
177          ]
178
179[ obj obj_linpack_benchmark_double : linpack-benchmark.cpp
180          : release
181          [ check-target-builds ../config//has_f2c : : <build>no ]
182          ]
183
184[ obj obj_linpack_benchmark_native_float128 : linpack-benchmark.cpp
185          : release
186          <define>NATIVE_FLOAT128
187          [ check-target-builds ../config//has_float128 : : <build>no ]
188          [ check-target-builds ../config//has_f2c : : <build>no ]
189          ]
190
191[ obj obj_linpack_benchmark_float128 : linpack-benchmark.cpp
192          : release
193          <define>TEST_FLOAT128
194          [ check-target-builds ../config//has_float128 : : <build>no ]
195          [ check-target-builds ../config//has_f2c : : <build>no ]
196          ]
197
198[ obj obj_linpack_benchmark_cpp_quad_float : linpack-benchmark.cpp
199          : release
200          <define>TEST_CPP_BIN_FLOAT_QUAD
201          [ check-target-builds ../config//has_f2c : : <build>no ]
202          ]
203
204[ obj obj_linpack_benchmark_cpp_oct_float : linpack-benchmark.cpp
205          : release
206          <define>TEST_CPP_BIN_FLOAT_OCT
207          [ check-target-builds ../config//has_f2c : : <build>no ]
208          ]
209
210[ exe linpack_benchmark_mpfr : obj_linpack_benchmark_mpfr mpfr f2c gmp
211          : release
212          [ check-target-builds ../config//has_mpfr : : <build>no ]
213          <define>TEST_MPFR_50
214          [ check-target-builds ../config//has_f2c : : <build>no ]
215          ]
216
217[ exe linpack_benchmark_mpf : obj_linpack_benchmark_mpf gmp  f2c
218          : release
219          [ check-target-builds ../config//has_gmp : : <build>no ]
220          <define>TEST_MPF_50
221          [ check-target-builds ../config//has_f2c : : <build>no ]
222          ]
223
224[ exe linpack_benchmark_cpp_float : obj_linpack_benchmark_cpp_float  f2c
225          : release
226          <define>TEST_CPP_DEC_FLOAT
227          [ check-target-builds ../config//has_f2c : : <build>no ]
228          ]
229
230[ exe linpack_benchmark_double : obj_linpack_benchmark_double  f2c
231          : release
232          [ check-target-builds ../config//has_f2c : : <build>no ]
233          ]
234
235[ exe linpack_benchmark_native_float128 : obj_linpack_benchmark_native_float128  f2c quadmath
236          : release
237          [ check-target-builds ../config//has_float128 : : <build>no ]
238          [ check-target-builds ../config//has_f2c : : <build>no ]
239          ]
240
241[ exe linpack_benchmark_float128 : obj_linpack_benchmark_float128  f2c quadmath
242          : release
243          [ check-target-builds ../config//has_float128 : : <build>no ]
244          [ check-target-builds ../config//has_f2c : : <build>no ]
245          ]
246
247[ exe linpack_benchmark_cpp_quad_float : obj_linpack_benchmark_cpp_quad_float  f2c
248          : release
249          [ check-target-builds ../config//has_f2c : : <build>no ]
250          ]
251
252[ exe linpack_benchmark_cpp_oct_float : obj_linpack_benchmark_cpp_oct_float  f2c
253          : release
254          [ check-target-builds ../config//has_f2c : : <build>no ]
255          ]
256
257;
258#
259# These cause conflicting targets for the build system when building
260# with multiple compilers, so they are not part of the regular CI tests:
261#
262test-suite performance_install :
263
264[ install miller_rabin_install : miller_rabin_performance : <location>. ]
265[ install performance_test_install : performance_test  : <location>. ]
266[ install sf_performance_install : sf_performance   : <location>. ]
267[ install . : linpack_benchmark_double linpack_benchmark_cpp_float linpack_benchmark_mpf linpack_benchmark_mpfr linpack_benchmark_native_float128 linpack_benchmark_float128 linpack_benchmark_cpp_quad_float linpack_benchmark_cpp_oct_float ]
268[ install delaunay_install : delaunay_test : <location>. ]
269[ install voronoi_install : voronoi_performance : <location>. ]
270
271;
272