# (C) Copyright 2015: Kyle Lutz # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import testing ; lib boost_unit_test_framework ; obj has_opencl : check/has_opencl.cpp ; explicit has_opencl ; project : source-location . : requirements BOOST_ALL_NO_LIB=1 msvc:_SCL_SECURE_NO_WARNINGS msvc:_CRT_SECURE_NO_WARNINGS msvc:NOMINMAX msvc:/wd4003 # Not enough actual parameters for a BOOST_PP macro msvc:/wd4244 # Warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data msvc:/wd4305 # Warning C4305: 'initializing': truncation from 'double' to 'float' msvc:/wd4800 # Warning C4800: 'uint32_t' : forcing value to bool 'true' or 'false' (performance warning) msvc:/wd4838 # Warning C4838: conversion from 'double' to 'float' requires a narrowing conversion /boost/test//boost_unit_test_framework [ check-target-builds has_opencl "OpenCL" : : no ] ; rule test_all { local all_rules = ; for local fileb in [ glob *.cpp ] { all_rules += [ run $(fileb) : : : shared:BOOST_TEST_DYN_LINK=1 linux:"-lOpenCL" darwin:"-framework OpenCL" freebsd:"-lOpenCL" ] ; } return $(all_rules) ; } test-suite compute : [ test_all r ] : ;