Jamfile.v2 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # (C) Copyright 2015: Kyle Lutz
  2. # Distributed under the Boost Software License, Version 1.0.
  3. # (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. import testing ;
  5. lib boost_unit_test_framework ;
  6. obj has_opencl : check/has_opencl.cpp ;
  7. explicit has_opencl ;
  8. project
  9. : source-location .
  10. : requirements
  11. <define>BOOST_ALL_NO_LIB=1
  12. <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
  13. <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
  14. <toolset>msvc:<define>NOMINMAX
  15. <toolset>msvc:<cxxflags>/wd4003 # Not enough actual parameters for a BOOST_PP macro
  16. <toolset>msvc:<cxxflags>/wd4244 # Warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data
  17. <toolset>msvc:<cxxflags>/wd4305 # Warning C4305: 'initializing': truncation from 'double' to 'float'
  18. <toolset>msvc:<cxxflags>/wd4800 # Warning C4800: 'uint32_t' : forcing value to bool 'true' or 'false' (performance warning)
  19. <toolset>msvc:<cxxflags>/wd4838 # Warning C4838: conversion from 'double' to 'float' requires a narrowing conversion
  20. <library>/boost/test//boost_unit_test_framework
  21. [ check-target-builds has_opencl "OpenCL" : : <build>no ]
  22. ;
  23. rule test_all
  24. {
  25. local all_rules = ;
  26. for local fileb in [ glob *.cpp ]
  27. {
  28. all_rules += [ run $(fileb)
  29. :
  30. :
  31. :
  32. <link>shared:<define>BOOST_TEST_DYN_LINK=1
  33. <host-os>linux:<linkflags>"-lOpenCL"
  34. <host-os>darwin:<linkflags>"-framework OpenCL"
  35. <host-os>freebsd:<linkflags>"-lOpenCL"
  36. ] ;
  37. }
  38. return $(all_rules) ;
  39. }
  40. test-suite compute : [ test_all r ] : ;