select_compiler_config.hpp 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. // Boost compiler configuration selection header file
  2. // (C) Copyright John Maddock 2001 - 2003.
  3. // (C) Copyright Martin Wille 2003.
  4. // (C) Copyright Guillaume Melquiond 2003.
  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. // See http://www.boost.org/ for most recent version.
  10. // locate which compiler we are using and define
  11. // BOOST_COMPILER_CONFIG as needed:
  12. #if defined __CUDACC__
  13. // NVIDIA CUDA C++ compiler for GPU
  14. # include "boost/config/compiler/nvcc.hpp"
  15. #endif
  16. #if defined(__GCCXML__)
  17. // GCC-XML emulates other compilers, it has to appear first here!
  18. # define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
  19. #elif defined(_CRAYC)
  20. // EDG based Cray compiler:
  21. # define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp"
  22. #elif defined __COMO__
  23. // Comeau C++
  24. # define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
  25. #elif defined(__PATHSCALE__) && (__PATHCC__ >= 4)
  26. // PathScale EKOPath compiler (has to come before clang and gcc)
  27. # define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp"
  28. #elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
  29. // Intel
  30. # define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp"
  31. #elif defined __clang__
  32. // Clang C++ emulates GCC, so it has to appear early.
  33. # define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp"
  34. #elif defined __DMC__
  35. // Digital Mars C++
  36. # define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
  37. # elif defined __GNUC__
  38. // GNU C++:
  39. # define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp"
  40. #elif defined __KCC
  41. // Kai C++
  42. # define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp"
  43. #elif defined __sgi
  44. // SGI MIPSpro C++
  45. # define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp"
  46. #elif defined __DECCXX
  47. // Compaq Tru64 Unix cxx
  48. # define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp"
  49. #elif defined __ghs
  50. // Greenhills C++
  51. # define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"
  52. #elif defined __CODEGEARC__
  53. // CodeGear - must be checked for before Borland
  54. # define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp"
  55. #elif defined __BORLANDC__
  56. // Borland
  57. # define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"
  58. #elif defined __MWERKS__
  59. // Metrowerks CodeWarrior
  60. # define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp"
  61. #elif defined __SUNPRO_CC
  62. // Sun Workshop Compiler C++
  63. # define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp"
  64. #elif defined __HP_aCC
  65. // HP aCC
  66. # define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp"
  67. #elif defined(__MRC__) || defined(__SC__)
  68. // MPW MrCpp or SCpp
  69. # define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"
  70. #elif defined(__IBMCPP__)
  71. // IBM Visual Age
  72. # define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"
  73. #elif defined(__PGI)
  74. // Portland Group Inc.
  75. # define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp"
  76. #elif defined _MSC_VER
  77. // Microsoft Visual C++
  78. //
  79. // Must remain the last #elif since some other vendors (Metrowerks, for
  80. // example) also #define _MSC_VER
  81. # define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"
  82. #elif defined (BOOST_ASSERT_CONFIG)
  83. // this must come last - generate an error if we don't
  84. // recognise the compiler:
  85. # error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
  86. #endif