• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# copyright John Maddock 2013
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 mpfi_path = [ modules.peek : MPFI_PATH ] ;
13local tommath_path = [ modules.peek : TOMMATH_PATH ] ;
14
15project : requirements
16   <include>$(gmp_path)
17   <include>$(gmp_path)/mpfr
18   <include>$(gmp_path)/gmpfrxx
19   <include>$(mpfr_path)
20   <include>$(mpfi_path)
21   <include>$(mpfi_path)/src
22   <include>$(tommath_path)
23   <include>../../..
24   # We set these to make it easier to set up and test GMP and MPFR under Win32:
25   #<toolset>msvc:<runtime-link>static
26   #<toolset>msvc:<link>static
27   #<toolset>msvc:<warnings>all
28   #<toolset>intel-win:<runtime-link>static
29   #<toolset>intel-win:<link>static
30   # Speed up compiles:
31   #<toolset>msvc:<debug-symbols>off
32   #<toolset>intel:<debug-symbols>off
33   <toolset>gcc:<cxxflags>-Wall
34   <toolset>gcc:<cxxflags>-Wextra
35   <toolset>intel:<define>SLOW_COMPILER
36   <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
37   ;
38
39lib gmp : : <search>$(gmp_path) ;
40lib mpfr : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug ;
41lib mpfi : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug <search>$(mpfi_path) <search>$(mpfi_path)/src ;
42lib quadmath ;
43
44rule generate_objs ( suffix : variant_count : build_opts * )
45{
46   local result ;
47   switch $(variant_count)
48   {
49   case "1" : variant_list = 1 ;
50   case "2" : variant_list = 1 2 ;
51   case "3" : variant_list = 1 2 3 ;
52   case "4" : variant_list = 1 2 3 4 ;
53   case "5" : variant_list = 1 2 3 4 5 ;
54   case "6" : variant_list = 1 2 3 4 5 6 ;
55   }
56
57   for group_id in 1 2 3 4 5 6 7 8 9 10
58   {
59      for variant_id in $(variant_list)
60      {
61         name = "test_instances$(suffix)_$(group_id)_$(variant_id)" ;
62         obj $(name) : instances.cpp : release <define>BOOST_MATH_TEST_TYPE=test_type_$(variant_id) <define>TEST_GROUP_$(group_id) $(build_opts) ;
63         result += $(name) ;
64      }
65   }
66   return $(result) ;
67}
68
69lib test_instances_mpf : [ generate_objs "_mpf" : 5 : <define>TEST_MPF_50 ] : [ check-target-builds ../../../config//has_gmp : : <build>no ] ;
70lib test_instances_mpfr : [ generate_objs "_mpfr" : 4 : <define>TEST_MPFR_50 ] : [ check-target-builds ../../../config//has_mpfr : : <build>no ] ;
71lib test_instances_cpp_dec_float : [ generate_objs "_cpp_dec_float" : 3 : <define>TEST_CPP_DEC_FLOAT ] : ;
72lib test_instances_cpp_bin_float : [ generate_objs "_cpp_bin_float" : 1 : <define>TEST_CPP_BIN_FLOAT ] : ;
73lib test_instances_float128 : [ generate_objs "_float128" : 1 : <define>TEST_FLOAT128 ] : [ check-target-builds ../../../config//has_float128 : : <build>no ] ;
74lib test_instances_intel_quad : [ generate_objs "_intel_quad" : 1 : <define>TEST_FLOAT128 <cxxflags>-Qoption,cpp,--extended_float_type ] : [ check-target-builds ../../../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] ;
75
76explicit test_instances_mpf ;
77explicit test_instances_mpfr ;
78explicit test_instances_cpp_dec_float ;
79explicit test_instances_cpp_bin_float ;
80explicit test_instances_float128 ;
81explicit test_instances_intel_quad ;
82
83