f68111457d
The use of 'compile' rule interferes with --dump-tests option of b2 and prevents correct running of tests in some of the other Boost libraries.
50 lines
1.7 KiB
Plaintext
50 lines
1.7 KiB
Plaintext
# (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
|
|
<define>BOOST_ALL_NO_LIB=1
|
|
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
|
|
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
|
|
<toolset>msvc:<define>NOMINMAX
|
|
<toolset>msvc:<cxxflags>/wd4003 # Not enough actual parameters for a BOOST_PP macro
|
|
<toolset>msvc:<cxxflags>/wd4244 # Warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data
|
|
<toolset>msvc:<cxxflags>/wd4305 # Warning C4305: 'initializing': truncation from 'double' to 'float'
|
|
<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
|
|
{
|
|
local all_rules = ;
|
|
|
|
for local fileb in [ glob *.cpp ]
|
|
{
|
|
all_rules += [ run $(fileb)
|
|
:
|
|
:
|
|
:
|
|
<link>shared:<define>BOOST_TEST_DYN_LINK=1
|
|
<host-os>linux:<linkflags>"-lOpenCL"
|
|
<host-os>darwin:<linkflags>"-framework OpenCL"
|
|
<host-os>freebsd:<linkflags>"-lOpenCL"
|
|
] ;
|
|
}
|
|
|
|
return $(all_rules) ;
|
|
}
|
|
|
|
test-suite compute : [ test_all r ] : ;
|