Blame view

3rdparty/boost_1_81_0/libs/iostreams/build/Jamfile.v2 3.17 KB
73ef4ff3   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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
  # Boost.Iostreams Library Build Jamfile
  
  # (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
  # (C) Copyright 2004-2007 Jonathan Turkanis
  # 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://www.boost.org/libs/iostreams for documentation.
  
  project /boost/iostreams : source-location ../src ;
  
  # The biggest trick in this Jamfile is to link to zlib and bzip2 when
  # needed. To configure that, a number of variables are used, which must
  # be set by user with 'path-constant' either in Boost's root Jamfile, or
  # in user-config.jam.
  
  # For each library with either link to existing binary, or build
  # a library from the sources.
  
  import modules ;
  import os ;
  import path ;
  import ac ;
  local debug = [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] ;
  
  local libraries-to-install = boost_iostreams ;
  
  for local v in NO_COMPRESSION 
                 NO_ZLIB
                 NO_BZIP2
                 NO_LZMA
                 NO_ZSTD
  {
      $(v) = [ modules.peek : $(v) ] ;
  }
  
  if $(NO_COMPRESSION) != 1 && $(NO_ZLIB) != 1
  {
      using zlib : : <build-name>boost_zlib <tag>@tag ;
      zlib-requirements =
          [ ac.check-library /zlib//zlib : <library>/zlib//zlib
            <source>zlib.cpp <source>gzip.cpp ] ;
  
      if [ os.environ ZLIB_SOURCE ]
      {
          alias boost_zlib : /zlib//zlib ;
          libraries-to-install += boost_zlib ;
      }
  }
  else
  {
      if $(debug)
      {
          ECHO "notice: iostreams: not using zlib compression " ;
      }
  }
  
  if $(NO_COMPRESSION) != 1 && $(NO_BZIP2) != 1
  {
      using bzip2 : : <build-name>boost_bzip2 <tag>@tag ;
      bzip2-requirements =
          [ ac.check-library /bzip2//bzip2 : <library>/bzip2//bzip2
            <source>bzip2.cpp ] ;
  
      if [ os.environ BZIP2_SOURCE ]
      {
          alias boost_bzip2 : /bzip2//bzip2 ;
          libraries-to-install += boost_bzip2 ;
      }
  }
  else
  {
      if $(debug)
      {
          ECHO "notice: iostreams: not using bzip compression " ;
      }
  }
  
  if $(NO_COMPRESSION) != 1 && $(NO_LZMA) != 1
  {
      using lzma ;
  
      exe has_lzma_cputhreads : ../build/has_lzma_cputhreads.cpp /lzma//lzma ;
      explicit has_lzma_cputhreads ;
  
      lzma-requirements =
          [ ac.check-library /lzma//lzma : <library>/lzma//lzma
            <source>lzma.cpp ]
          [ check-target-builds has_lzma_cputhreads
              : : <define>BOOST_IOSTREAMS_LZMA_NO_MULTITHREADED=1 ] ;
  }
  else
  {
      if $(debug)
      {
          ECHO "notice: iostreams: not using lzma compression " ;
      }
  }
  
  if $(NO_COMPRESSION) != 1 && $(NO_ZSTD) != 1
  {
      using zstd ;
      zstd-requirements =
          [ ac.check-library /zstd//zstd : <library>/zstd//zstd
            <source>zstd.cpp ] ;
  }
  else
  {
      if $(debug)
      {
          ECHO "notice: iostreams: not using zstd compression " ;
      }
  }
  
  local sources = file_descriptor.cpp mapped_file.cpp ;
  
  lib boost_iostreams 
      : $(sources) 
      : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 
        <define>BOOST_IOSTREAMS_USE_DEPRECATED
        $(zlib-requirements)
        $(bzip2-requirements)
        $(lzma-requirements)
        $(zstd-requirements)
      :
      : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
      ;
  
  boost-install $(libraries-to-install) ;