Blame view

3rdparty/boost_1_81_0/libs/gil/test/Jamfile 3.94 KB
977ed18d   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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
  # Boost.GIL (Generic Image Library) - tests
  #
  # Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
  # Copyright (c) 2018-2019 Mateusz Loskot <mateusz@loskot.net>
  # Copyright (c) 2018 Dmitry Arkhipov
  # Copyright (c) 2007-2015 Andrey Semashev
  #
  # Use, modification and distribution is subject to 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 ../../config/checks/config : requires ;
  import os ;
  import path ;
  import regex ;
  import sequence ;
  import testing ;
  
  # The <experimental/filesystem> header providing std::experimental::filesystem
  # is deprecated by Microsoft and will be REMOVED. It is superseded by the C++17
  # <filesystem> header providing std::filesystem.
  # You can define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
  # to acknowledge that you have received this warning.
  local msvc-cxxs-with-experimental-fs = 14 ;
  
  project
    :
    requirements
      [ requires
          cxx11_constexpr
          cxx11_defaulted_functions
          cxx11_template_aliases
          cxx11_trailing_result_types  # implies decltype and auto
          cxx11_variadic_templates
          cxx14_constexpr
          cxx14_return_type_deduction
      ]
      <include>.
      # TODO: Enable concepts check for all, not just test/core
      #<define>BOOST_GIL_USE_CONCEPT_CHECK=1
      <toolset>msvc,<cxxstd>$(msvc-cxxs-with-experimental-fs):<define>_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING=1
      <toolset>msvc:<cxxflags>/bigobj
    ;
  
  variant gil_ubsan_integer
      : release
      :
      <cxxflags>"-Wno-unused -fstrict-aliasing -fno-omit-frame-pointer -fsanitize=integer -fno-sanitize-recover=integer -fsanitize-blacklist=libs/gil/.ci/blacklist.supp"
      <linkflags>"-fsanitize=integer"
      <debug-symbols>on
      <define>BOOST_USE_ASAN=1
      ;
  
  variant gil_ubsan_nullability
      : release
      :
      <cxxflags>"-Wno-unused -fstrict-aliasing -fno-omit-frame-pointer -fsanitize=nullability -fno-sanitize-recover=nullability -fsanitize-blacklist=libs/gil/.ci/blacklist.supp"
      <linkflags>"-fsanitize=nullability"
      <debug-symbols>on
      <define>BOOST_USE_ASAN=1
      ;
  
  variant gil_ubsan_undefined
      : release
      :
      <cxxflags>"-Wno-unused -fstrict-aliasing -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=undefined -fsanitize-blacklist=libs/gil/.ci/blacklist.supp"
      <linkflags>"-fsanitize=undefined"
      <debug-symbols>on
      <define>BOOST_USE_ASAN=1
      ;
  
  rule generate_self_contained_headers ( headers_subpath * : exclude_subpaths * )
  {
      # On CI services, test the self-contained headers on-demand only to avoid build timeouts
      # CI environment is common for Travis CI, AppVeyor, CircleCI, etc.
      # For example:
      # if ! [ os.environ CI ] || [ os.environ TEST_HEADERS ] {
      #    alias self_contained_headers : [ generate_self_contained_headers ] ;
      # }
  
      local targets ;
  
      # NOTE: All '/' in test names are replaced with '-' because apparently
      #       test scripts have a problem with test names containing slashes.
  
      local top_headers_path = [ path.make $(BOOST_ROOT)/libs/gil/include/boost/gil ] ;
      local headers_path = $(top_headers_path) ;
      if $(headers_subpath)
      {
          headers_path = $(top_headers_path)/$(headers_subpath) ;
      }
  
      for local file in [ path.glob-tree $(headers_path) : *.hpp : $(exclude_subpaths) ]
      {
          local target_no = [ sequence.length $(targets) ] ;
          local rel_file = [ path.relative-to $(top_headers_path) $(file) ] ;
          local target_name = [ regex.replace h/$(target_no)/$(rel_file) "/" "-" ] ;
          local target_name = [ regex.replace $(target_name) "\.hpp" "" ] ;
          targets += [
              compile $(BOOST_ROOT)/libs/gil/test/header/main.cpp
              : <define>"BOOST_GIL_TEST_HEADER=$(rel_file)" <dependency>$(file)
              : $(target_name)
          ] ;
      }
  
      return $(targets) ;
  }
  
  run test_utility_output_stream.cpp ;
  
  build-project core ;
  build-project legacy ;
  build-project extension ;