/Src/Dependencies/Boost/boost/thread/detail/config.hpp

http://hadesmem.googlecode.com/ · C++ Header · 100 lines · 56 code · 11 blank · 33 comment · 8 complexity · 45529c2aa8b04582b761f6354d0e2027 MD5 · raw file

  1. // Copyright (C) 2001-2003
  2. // William E. Kempf
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. #ifndef BOOST_THREAD_CONFIG_WEK01032003_HPP
  7. #define BOOST_THREAD_CONFIG_WEK01032003_HPP
  8. #include <boost/config.hpp>
  9. #include <boost/detail/workaround.hpp>
  10. #if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
  11. # pragma warn -8008 // Condition always true/false
  12. # pragma warn -8080 // Identifier declared but never used
  13. # pragma warn -8057 // Parameter never used
  14. # pragma warn -8066 // Unreachable code
  15. #endif
  16. #include "platform.hpp"
  17. // provided for backwards compatibility, since this
  18. // macro was used for several releases by mistake.
  19. #if defined(BOOST_THREAD_DYN_DLL)
  20. # define BOOST_THREAD_DYN_LINK
  21. #endif
  22. // compatibility with the rest of Boost's auto-linking code:
  23. #if defined(BOOST_THREAD_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
  24. # undef BOOST_THREAD_USE_LIB
  25. # define BOOST_THREAD_USE_DLL
  26. #endif
  27. #if defined(BOOST_THREAD_BUILD_DLL) //Build dll
  28. #elif defined(BOOST_THREAD_BUILD_LIB) //Build lib
  29. #elif defined(BOOST_THREAD_USE_DLL) //Use dll
  30. #elif defined(BOOST_THREAD_USE_LIB) //Use lib
  31. #else //Use default
  32. # if defined(BOOST_THREAD_PLATFORM_WIN32)
  33. # if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN)
  34. //For compilers supporting auto-tss cleanup
  35. //with Boost.Threads lib, use Boost.Threads lib
  36. # define BOOST_THREAD_USE_LIB
  37. # else
  38. //For compilers not yet supporting auto-tss cleanup
  39. //with Boost.Threads lib, use Boost.Threads dll
  40. # define BOOST_THREAD_USE_DLL
  41. # endif
  42. # else
  43. # define BOOST_THREAD_USE_LIB
  44. # endif
  45. #endif
  46. #if defined(BOOST_HAS_DECLSPEC)
  47. # if defined(BOOST_THREAD_BUILD_DLL) //Build dll
  48. # define BOOST_THREAD_DECL __declspec(dllexport)
  49. # elif defined(BOOST_THREAD_USE_DLL) //Use dll
  50. # define BOOST_THREAD_DECL __declspec(dllimport)
  51. # else
  52. # define BOOST_THREAD_DECL
  53. # endif
  54. #else
  55. # define BOOST_THREAD_DECL
  56. #endif // BOOST_HAS_DECLSPEC
  57. //
  58. // Automatically link to the correct build variant where possible.
  59. //
  60. #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_THREAD_NO_LIB) && !defined(BOOST_THREAD_BUILD_DLL) && !defined(BOOST_THREAD_BUILD_LIB)
  61. //
  62. // Tell the autolink to link dynamically, this will get undef'ed by auto_link.hpp
  63. // once it's done with it:
  64. //
  65. #if defined(BOOST_THREAD_USE_DLL)
  66. # define BOOST_DYN_LINK
  67. #endif
  68. //
  69. // Set the name of our library, this will get undef'ed by auto_link.hpp
  70. // once it's done with it:
  71. //
  72. #if defined(BOOST_THREAD_LIB_NAME)
  73. # define BOOST_LIB_NAME BOOST_THREAD_LIB_NAME
  74. #else
  75. # define BOOST_LIB_NAME boost_thread
  76. #endif
  77. //
  78. // If we're importing code from a dll, then tell auto_link.hpp about it:
  79. //
  80. // And include the header that does the work:
  81. //
  82. #include <boost/config/auto_link.hpp>
  83. #endif // auto-linking disabled
  84. #endif // BOOST_THREAD_CONFIG_WEK1032003_HPP
  85. // Change Log:
  86. // 22 Jan 05 Roland Schwarz (speedsnail)
  87. // Usage of BOOST_HAS_DECLSPEC macro.
  88. // Default again is static lib usage.
  89. // BOOST_DYN_LINK only defined when autolink included.