link.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. #ifndef BOOST_ATOMIC_DETAIL_LINK_HPP_INCLUDED_
  15. #define BOOST_ATOMIC_DETAIL_LINK_HPP_INCLUDED_
  16. #include <boost/atomic/detail/config.hpp>
  17. #ifdef BOOST_HAS_PRAGMA_ONCE
  18. #pragma once
  19. #endif
  20. ///////////////////////////////////////////////////////////////////////////////
  21. // Set up dll import/export options
  22. #if (defined(BOOST_ATOMIC_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \
  23. !defined(BOOST_ATOMIC_STATIC_LINK)
  24. #if defined(BOOST_ATOMIC_SOURCE)
  25. #define BOOST_ATOMIC_DECL BOOST_SYMBOL_EXPORT
  26. #define BOOST_ATOMIC_BUILD_DLL
  27. #else
  28. #define BOOST_ATOMIC_DECL BOOST_SYMBOL_IMPORT
  29. #endif
  30. #endif // building a shared library
  31. #ifndef BOOST_ATOMIC_DECL
  32. #define BOOST_ATOMIC_DECL
  33. #endif
  34. ///////////////////////////////////////////////////////////////////////////////
  35. // Auto library naming
  36. #if !defined(BOOST_ATOMIC_SOURCE) && !defined(BOOST_ALL_NO_LIB) && \
  37. !defined(BOOST_ATOMIC_NO_LIB)
  38. #define BOOST_LIB_NAME boost_atomic
  39. // tell the auto-link code to select a dll when required:
  40. #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ATOMIC_DYN_LINK)
  41. #define BOOST_DYN_LINK
  42. #endif
  43. #include <boost/config/auto_link.hpp>
  44. #endif // auto-linking disabled
  45. #endif