No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RedefineCompilerMacros.h 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // DO NOT PUT #pragma once or include guard check here
  2. // This header is designed to be able to be included multiple times
  3. // This header is used to redefine compiler macros after they were temporary undefined by UndefineCompilerMacros.h
  4. // Please make sure to always use this paired with the UndefineCompilerMacros.h header.
  5. //
  6. // ex.
  7. //
  8. // #include "UndefineCompilerMacros.h"
  9. // #include "Some3rdParty.h"
  10. // #include "RedefineCompilerMacros.h"
  11. #ifndef DETAIL__COMPILERMACROS_HAD_BEEN_UNDEFINED_BY_UNDEFINECOMPILER_H
  12. #error "RedefineCompilerMacros.h can only be used after UndefinePlatforms.h got included before."
  13. #endif
  14. #undef DETAIL__COMPILERMACROS_HAD_BEEN_UNDEFINED_BY_UNDEFINECOMPILER_H
  15. #undef COMPILER_GCC
  16. #if defined(DETAIL__TEMP_COMPILER_GCC_WAS_1)
  17. #undef DETAIL__TEMP_COMPILER_GCC_WAS_1
  18. #define COMPILER_GCC 1
  19. #else
  20. #define COMPILER_GCC 0
  21. #endif
  22. #undef COMPILER_CLANG
  23. #if defined(DETAIL__TEMP_COMPILER_CLANG_WAS_1)
  24. #undef DETAIL__TEMP_COMPILER_CLANG_WAS_1
  25. #define COMPILER_CLANG 1
  26. #else
  27. #define COMPILER_CLANG 0
  28. #endif
  29. #undef COMPILER_MSVC
  30. #if defined(DETAIL__TEMP_COMPILER_MSVC_WAS_1)
  31. #undef DETAIL__TEMP_COMPILER_MSVC_WAS_1
  32. #define COMPILER_MSVC 1
  33. #else
  34. #define COMPILER_MSVC 0
  35. #endif
  36. #undef COMPILER_MSVC_EMULATED_BY_CLANG
  37. #if defined(DETAIL__TEMP_COMPILER_MSVC_EMULATED_BY_CLANG_WAS_1)
  38. #undef DETAIL__TEMP_COMPILER_MSVC_EMULATED_BY_CLANG_WAS_1
  39. #define COMPILER_MSVC_EMULATED_BY_CLANG 1
  40. #else
  41. #define COMPILER_MSVC_EMULATED_BY_CLANG 0
  42. #endif