1 /* 2 * Distributed under the Boost Software License, Version 1.0. 3 * (See accompanying file LICENSE_1_0.txt or copy at 4 * http://www.boost.org/LICENSE_1_0.txt) 5 * 6 * Copyright (c) 2012 Hartmut Kaiser 7 * Copyright (c) 2014 Andrey Semashev 8 */ 9 /*! 10 * \file atomic/detail/config.hpp 11 * 12 * This header defines macros for linking with compiled library of Boost.Atomic 13 */ 14 15 #ifndef BOOST_ATOMIC_DETAIL_LINK_HPP_INCLUDED_ 16 #define BOOST_ATOMIC_DETAIL_LINK_HPP_INCLUDED_ 17 18 #include <boost/atomic/detail/config.hpp> 19 20 #ifdef BOOST_HAS_PRAGMA_ONCE 21 #pragma once 22 #endif 23 24 /////////////////////////////////////////////////////////////////////////////// 25 // Set up dll import/export options 26 #if (defined(BOOST_ATOMIC_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \ 27 !defined(BOOST_ATOMIC_STATIC_LINK) 28 29 #if defined(BOOST_ATOMIC_SOURCE) 30 #define BOOST_ATOMIC_DECL BOOST_SYMBOL_EXPORT 31 #define BOOST_ATOMIC_BUILD_DLL 32 #else 33 #define BOOST_ATOMIC_DECL BOOST_SYMBOL_IMPORT 34 #endif 35 36 #endif // building a shared library 37 38 #ifndef BOOST_ATOMIC_DECL 39 #define BOOST_ATOMIC_DECL 40 #endif 41 42 /////////////////////////////////////////////////////////////////////////////// 43 // Auto library naming 44 #if !defined(BOOST_ATOMIC_SOURCE) && !defined(BOOST_ALL_NO_LIB) && \ 45 !defined(BOOST_ATOMIC_NO_LIB) 46 47 #define BOOST_LIB_NAME boost_atomic 48 49 // tell the auto-link code to select a dll when required: 50 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ATOMIC_DYN_LINK) 51 #define BOOST_DYN_LINK 52 #endif 53 54 #include <boost/config/auto_link.hpp> 55 56 #endif // auto-linking disabled 57 58 #endif 59