Blame view

3rdparty/boost_1_81_0/libs/compute/test/Jamfile.v2 1.66 KB
e6ccf0ce   Hu Chunming   提交三方库
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  # (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 ] :  ;