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 ; 8 9local ntl-path = [ modules.peek : NTL_PATH ] ; 10local gmp_path = [ modules.peek : GMP_PATH ] ; 11local mpfr_path = [ modules.peek : MPFR_PATH ] ; 12local tommath_path = [ modules.peek : TOMMATH_PATH ] ; 13 14project : requirements 15 <target-os>freebsd:<linkflags>"-lrt" 16 <target-os>linux:<linkflags>"-lrt" 17 <toolset>pgi:<linkflags>"-lrt" 18 <include>$(gmp_path) 19 <include>$(gmp_path)/mpfr 20 <include>$(gmp_path)/gmpfrxx 21 <include>$(mpfr_path) 22 <include>$(tommath_path) 23 <include>../../.. 24 <search>$(gmp_path) 25 <search>$(mpfr_path) 26 <search>$(mpfr_path)/build.vc10/lib/Win32/Debug 27 <search>$(tommath_path) 28 <link>static 29 <define>BOOST_ALL_NO_LIB 30 <debug-symbols>off 31 ; 32 33 34lib gmp ; 35lib mpfr ; 36 37if $(tommath_path) 38{ 39 TOMMATH = [ GLOB $(tommath_path) : *.c ] ; 40} 41else 42{ 43 lib tommath ; 44 TOMMATH = tommath ; 45} 46 47exe performance_test : performance_test.cpp /boost/system//boost_system 48 : release 49 [ check-target-builds ../config//has_gmp : <define>TEST_MPF <define>TEST_MPZ <source>gmp : ] 50 [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr : ] 51 [ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>$(TOMMATH) : ] 52 <define>TEST_CPP_DEC_FLOAT 53 <define>TEST_CPP_INT 54 ; 55 56exe miller_rabin_performance : miller_rabin_performance.cpp /boost/system//boost_system /boost/chrono//boost_chrono 57 : release 58 [ check-target-builds ../config//has_gmp : <define>TEST_MPF <define>TEST_MPZ <source>gmp : ] 59 [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr : ] 60 #[ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>$(TOMMATH) : ] 61 <define>TEST_CPP_DEC_FLOAT 62 <define>TEST_CPP_INT 63 ; 64 65exe sf_performance : sf_performance.cpp sf_performance_basic.cpp sf_performance_bessel.cpp 66 sf_performance_bessel1.cpp sf_performance_bessel2.cpp sf_performance_bessel3.cpp 67 sf_performance_bessel4.cpp sf_performance_bessel5.cpp sf_performance_bessel6.cpp 68 sf_performance_nct.cpp sf_performance_nct1.cpp 69 sf_performance_nct2.cpp sf_performance_nct3.cpp sf_performance_nct4.cpp 70 sf_performance_nct5.cpp sf_performance_nct6.cpp 71 sf_performance_poly.cpp 72 /boost/system//boost_system /boost/chrono//boost_chrono /boost/thread//boost_thread 73 : release 74 [ check-target-builds ../config//has_gmp : <define>TEST_MPF <define>TEST_MPZ <source>gmp : ] 75 [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr : ] 76 <define>TEST_CPP_DEC_FLOAT 77 <toolset>msvc:<cxxflags>-bigobj 78 ; 79 80exe delaunay_test : delaunay_test.cpp /boost/system//boost_system /boost/chrono//boost_chrono ; 81 82obj obj_linpack_benchmark_mpfr : linpack-benchmark.cpp 83 : release 84 [ check-target-builds ../config//has_mpfr : : <build>no ] 85 <define>TEST_MPFR_50 86 ; 87 88obj obj_linpack_benchmark_mpf : linpack-benchmark.cpp 89 : release 90 [ check-target-builds ../config//has_gmp : : <build>no ] 91 <define>TEST_MPF_50 92 ; 93 94obj obj_linpack_benchmark_cpp_float : linpack-benchmark.cpp 95 : release 96 <define>TEST_CPP_DEC_FLOAT 97 ; 98 99obj obj_linpack_benchmark_double : linpack-benchmark.cpp 100 : release 101 ; 102 103lib f2c ; 104 105exe linpack_benchmark_mpfr : obj_linpack_benchmark_mpfr mpfr f2c gmp 106 : release 107 [ check-target-builds ../config//has_mpfr : : <build>no ] 108 <define>TEST_MPFR_50 109 ; 110 111exe linpack_benchmark_mpf : obj_linpack_benchmark_mpf gmp f2c 112 : release 113 [ check-target-builds ../config//has_gmp : : <build>no ] 114 <define>TEST_MPF_50 115 ; 116 117exe linpack_benchmark_cpp_float : obj_linpack_benchmark_cpp_float f2c 118 : release 119 <define>TEST_CPP_DEC_FLOAT 120 ; 121 122exe linpack_benchmark_double : obj_linpack_benchmark_double f2c 123 : release 124 ; 125 126install miller_rabin_install : miller_rabin_performance : <location>. ; 127install performance_test_install : performance_test : <location>. ; 128install sf_performance_install : sf_performance : <location>. ; 129install . : linpack_benchmark_double linpack_benchmark_cpp_float linpack_benchmark_mpf linpack_benchmark_mpfr ; 130install delaunay_install : delaunay_test : <location>. ; 131 132 133 134