diff options
Diffstat (limited to 'zencore')
| -rw-r--r-- | zencore/include/zencore/zencore.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/zencore/include/zencore/zencore.h b/zencore/include/zencore/zencore.h index 59c950ac4..fe6b90c7c 100644 --- a/zencore/include/zencore/zencore.h +++ b/zencore/include/zencore/zencore.h @@ -29,8 +29,22 @@ // Compiler // -#ifdef _MSC_VER -# define ZEN_COMPILER_MSC 1 +#define ZEN_COMPILER_CLANG 0 +#define ZEN_COMPILER_MSC 0 +#define ZEN_COMPILER_GCC 0 + +// Clang can define __GNUC__ and/or _MSC_VER so we check for Clang first +#ifdef __clang__ +# undef ZEN_COMPILER_CLANG +# define ZEN_COMPILER_CLANG 1 +#elif defined(_MSC_VER) +# undef ZEN_COMPILER_MSC +# define ZEN_COMPILER_MSC 1 +#elif defined(__GNUC__) +# undef ZEN_COMPILER_GCC +# define ZEN_COMPILER_GCC 1 +#else +# error Unknown compiler #endif #ifndef ZEN_COMPILER_MSC |