2
0
mirror of https://github.com/boostorg/compute.git synced 2026-01-27 06:42:19 +00:00

Merge pull request #689 from Flast/check-opencl-availability

Check opencl availability on test.
This commit is contained in:
Kyle Lutz
2017-03-20 20:01:32 -07:00
committed by GitHub
2 changed files with 16 additions and 0 deletions

View File

@@ -6,6 +6,9 @@ import testing ;
lib boost_unit_test_framework ;
compile check/has_opencl.cpp : : has_opencl ;
explicit has_opencl ;
project
: source-location .
: requirements
@@ -19,6 +22,8 @@ project
<toolset>msvc:<cxxflags>/wd4800 # Warning C4800: 'uint32_t' : forcing value to bool 'true' or 'false' (performance warning)
<toolset>msvc:<cxxflags>/wd4838 # Warning C4838: conversion from 'double' to 'float' requires a narrowing conversion
<library>/boost/test//boost_unit_test_framework
[ check-target-builds has_opencl "OpenCL" : : <build>no ]
;
rule test_all

11
test/check/has_opencl.cpp Normal file
View File

@@ -0,0 +1,11 @@
//---------------------------------------------------------------------------//
// Copyright (c) 2017 Kohei Takahashi
//
// 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
//
// See http://boostorg.github.com/compute for more information.
//---------------------------------------------------------------------------//
#include <boost/compute/cl.hpp>