link.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef BOOST_ATOMIC_DETAIL_LINK_HPP
  2. #define BOOST_ATOMIC_DETAIL_LINK_HPP
  3. // Copyright (c) 2012 Hartmut Kaiser
  4. //
  5. // Distributed under the Boost Software License, Version 1.0.
  6. // See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. #include <boost/atomic/detail/config.hpp>
  9. #ifdef BOOST_HAS_PRAGMA_ONCE
  10. #pragma once
  11. #endif
  12. ///////////////////////////////////////////////////////////////////////////////
  13. // Set up dll import/export options
  14. #if (defined(BOOST_ATOMIC_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \
  15. !defined(BOOST_ATOMIC_STATIC_LINK)
  16. #if defined(BOOST_ATOMIC_SOURCE)
  17. #define BOOST_ATOMIC_DECL BOOST_SYMBOL_EXPORT
  18. #define BOOST_ATOMIC_BUILD_DLL
  19. #else
  20. #define BOOST_ATOMIC_DECL BOOST_SYMBOL_IMPORT
  21. #endif
  22. #endif // building a shared library
  23. #ifndef BOOST_ATOMIC_DECL
  24. #define BOOST_ATOMIC_DECL
  25. #endif
  26. ///////////////////////////////////////////////////////////////////////////////
  27. // Auto library naming
  28. #if !defined(BOOST_ATOMIC_SOURCE) && !defined(BOOST_ALL_NO_LIB) && \
  29. !defined(BOOST_ATOMIC_NO_LIB)
  30. #define BOOST_LIB_NAME boost_atomic
  31. // tell the auto-link code to select a dll when required:
  32. #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ATOMIC_DYN_LINK)
  33. #define BOOST_DYN_LINK
  34. #endif
  35. #include <boost/config/auto_link.hpp>
  36. #endif // auto-linking disabled
  37. #endif