• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#  Boost.Atomic Library Jamfile
2#
3#  Copyright Helge Bahmann 2011.
4#  Copyright Andrey Semashev 2018, 2020.
5#
6#  Distributed under the Boost Software License, Version 1.0.
7#  (See accompanying file LICENSE_1_0.txt or copy at
8#  http://www.boost.org/LICENSE_1_0.txt)
9
10import common ;
11import project ;
12import configure ;
13
14lib synchronization ;
15explicit synchronization ;
16
17project boost/atomic
18    : requirements
19      <threading>multi
20      <link>shared:<define>BOOST_ATOMIC_DYN_LINK=1
21      <link>static:<define>BOOST_ATOMIC_STATIC_LINK=1
22      <define>BOOST_ATOMIC_SOURCE
23      <target-os>windows:<define>BOOST_USE_WINDOWS_H
24      <toolset>gcc,<target-os>windows:<linkflags>"-lkernel32"
25    : usage-requirements
26      <link>shared:<define>BOOST_ATOMIC_DYN_LINK=1
27      <link>static:<define>BOOST_ATOMIC_STATIC_LINK=1
28    : source-location ../src
29    ;
30
31rule select-platform-specific-sources ( properties * )
32{
33    local result ;
34
35    if <target-os>windows in $(properties)
36    {
37        result += <source>wait_ops_windows.cpp ;
38
39        if [ configure.builds ../config//has_synchronization : $(properties) : "has synchronization.lib" ]
40        {
41            result += <library>synchronization ;
42        }
43    }
44
45#    ECHO Platform sources: $(result) ;
46
47    return $(result) ;
48}
49
50lib boost_atomic
51   : ## sources ##
52     lock_pool.cpp
53   : ## requirements ##
54     <include>../src
55     <conditional>@select-platform-specific-sources
56   ;
57
58boost-install boost_atomic ;
59