Jamfile.v2 3.3 KB

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