CMakeCXXCompilerId.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* This source file must have a .cpp extension so that all C++ compilers
  2. recognize the extension without flags. Borland does not know .cxx for
  3. example. */
  4. #ifndef __cplusplus
  5. # error "A C compiler has been selected for C++."
  6. #endif
  7. static char const info_compiler[] = "INFO:compiler["
  8. #if defined(__COMO__)
  9. "Comeau"
  10. #elif defined(__INTEL_COMPILER) || defined(__ICC)
  11. "Intel"
  12. #elif defined(__BORLANDC__)
  13. "Borland"
  14. #elif defined(__WATCOMC__)
  15. "Watcom"
  16. #elif defined(__SUNPRO_CC)
  17. "SunPro"
  18. #elif defined(__HP_aCC)
  19. "HP"
  20. #elif defined(__DECCXX)
  21. "Compaq"
  22. #elif defined(__IBMCPP__)
  23. "VisualAge"
  24. #elif defined(__GNUC__)
  25. "GNU"
  26. #elif defined(_MSC_VER)
  27. "MSVC"
  28. #elif defined(_COMPILER_VERSION)
  29. "MIPSpro"
  30. /* This compiler is either not known or is too old to define an
  31. identification macro. Try to identify the platform and guess that
  32. it is the native compiler. */
  33. #elif defined(__sgi)
  34. "MIPSpro"
  35. #elif defined(__hpux) || defined(__hpua)
  36. "HP"
  37. #else /* unknown compiler */
  38. ""
  39. #endif
  40. "]";
  41. /* Include the platform identification source. */
  42. #include "CMakePlatformId.h"
  43. /* Make sure the information strings are referenced. */
  44. int main()
  45. {
  46. return (&info_compiler[0] != &info_platform[0]);
  47. }