Skip to content
Snippets Groups Projects
Commit 27ecec11 authored by Karsten Suehring's avatar Karsten Suehring
Browse files

MSVC minimum version and clang identification

- fail to build when MSVC version too low
- properly identify clang as compiler
parent 8d8f0316
No related branches found
No related tags found
1 merge request!277MSVC minimum version and clang identification
......@@ -53,9 +53,10 @@
#include "TypeDef.h"
#include "version.h"
// MS Visual Studio before 2014 does not support required C++11 features
#ifdef _MSC_VER
#if _MSC_VER <= 1500
inline int64_t abs (int64_t x) { return _abs64(x); };
#if _MSC_VER < 1900
#error "MS Visual Studio version not supported. Please upgrade to Visual Studio 2015 or higher (or use other compilers)"
#endif
#endif
......@@ -66,7 +67,14 @@ inline int64_t abs (int64_t x) { return _abs64(x); };
// Platform information
// ====================================================================================================================
#ifdef __GNUC__
#ifdef __clang__
#define NVM_COMPILEDBY "[clang %d.%d.%d]", __clang_major__, __clang_minor__, __clang_patchlevel__
#ifdef __IA64__
#define NVM_ONARCH "[on 64-bit] "
#else
#define NVM_ONARCH "[on 32-bit] "
#endif
#elif __GNUC__
#define NVM_COMPILEDBY "[GCC %d.%d.%d]", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__
#ifdef __IA64__
#define NVM_ONARCH "[on 64-bit] "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment