Core/Prerequesites: Fix Wexpansion-to-defined warning
This commit is contained in:
parent
6ebbf882f3
commit
72034c3301
|
|
@ -28,17 +28,14 @@
|
||||||
// Try to identify the compiler
|
// Try to identify the compiler
|
||||||
#if defined(__BORLANDC__)
|
#if defined(__BORLANDC__)
|
||||||
#define NAZARA_COMPILER_BORDLAND
|
#define NAZARA_COMPILER_BORDLAND
|
||||||
#define NAZARA_COMPILER_SUPPORTS_CPP11 (defined(__cplusplus) && __cplusplus >= 201103L)
|
|
||||||
#define NAZARA_DEPRECATED(txt)
|
#define NAZARA_DEPRECATED(txt)
|
||||||
#define NAZARA_FUNCTION __FUNC__
|
#define NAZARA_FUNCTION __FUNC__
|
||||||
#elif defined(__clang__)
|
#elif defined(__clang__)
|
||||||
#define NAZARA_COMPILER_CLANG
|
#define NAZARA_COMPILER_CLANG
|
||||||
#define NAZARA_COMPILER_SUPPORTS_CPP11 (defined(__cplusplus) && __cplusplus >= 201103L)
|
|
||||||
#define NAZARA_DEPRECATED(txt) __attribute__((__deprecated__(txt)))
|
#define NAZARA_DEPRECATED(txt) __attribute__((__deprecated__(txt)))
|
||||||
#define NAZARA_FUNCTION __PRETTY_FUNCTION__
|
#define NAZARA_FUNCTION __PRETTY_FUNCTION__
|
||||||
#elif defined(__GNUC__) || defined(__MINGW32__)
|
#elif defined(__GNUC__) || defined(__MINGW32__)
|
||||||
#define NAZARA_COMPILER_GCC
|
#define NAZARA_COMPILER_GCC
|
||||||
#define NAZARA_COMPILER_SUPPORTS_CPP11 (defined(__cplusplus) && __cplusplus >= 201103L)
|
|
||||||
#define NAZARA_DEPRECATED(txt) __attribute__((__deprecated__(txt)))
|
#define NAZARA_DEPRECATED(txt) __attribute__((__deprecated__(txt)))
|
||||||
#define NAZARA_FUNCTION __PRETTY_FUNCTION__
|
#define NAZARA_FUNCTION __PRETTY_FUNCTION__
|
||||||
|
|
||||||
|
|
@ -50,26 +47,31 @@
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__INTEL_COMPILER) || defined(__ICL)
|
#elif defined(__INTEL_COMPILER) || defined(__ICL)
|
||||||
#define NAZARA_COMPILER_INTEL
|
#define NAZARA_COMPILER_INTEL
|
||||||
#define NAZARA_COMPILER_SUPPORTS_CPP11 (defined(__cplusplus) && __cplusplus >= 201103L)
|
|
||||||
#define NAZARA_DEPRECATED(txt)
|
#define NAZARA_DEPRECATED(txt)
|
||||||
#define NAZARA_FUNCTION __FUNCTION__
|
#define NAZARA_FUNCTION __FUNCTION__
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#define NAZARA_COMPILER_MSVC
|
#define NAZARA_COMPILER_MSVC
|
||||||
#define NAZARA_COMPILER_SUPPORTS_CPP11 (_MSC_VER >= 1900)
|
|
||||||
#define NAZARA_DEPRECATED(txt) __declspec(deprecated(txt))
|
#define NAZARA_DEPRECATED(txt) __declspec(deprecated(txt))
|
||||||
#define NAZARA_FUNCTION __FUNCSIG__
|
#define NAZARA_FUNCTION __FUNCSIG__
|
||||||
|
|
||||||
|
#if _MSC_VER >= 1900
|
||||||
|
#define NAZARA_COMPILER_SUPPORTS_CPP11
|
||||||
|
#endif
|
||||||
|
|
||||||
#pragma warning(disable: 4251)
|
#pragma warning(disable: 4251)
|
||||||
#else
|
#else
|
||||||
#define NAZARA_COMPILER_UNKNOWN
|
#define NAZARA_COMPILER_UNKNOWN
|
||||||
#define NAZARA_COMPILER_SUPPORTS_CPP11 (defined(__cplusplus) && __cplusplus >= 201103L)
|
|
||||||
#define NAZARA_DEPRECATED(txt)
|
#define NAZARA_DEPRECATED(txt)
|
||||||
#define NAZARA_FUNCTION __func__ // __func__ has been standardized in C++ 2011
|
#define NAZARA_FUNCTION __func__ // __func__ has been standardized in C++ 2011
|
||||||
|
|
||||||
#pragma message This compiler is not fully supported
|
#pragma message This compiler is not fully supported
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !NAZARA_COMPILER_SUPPORTS_CPP11
|
#if !defined(NAZARA_COMPILER_SUPPORTS_CPP11) && defined(__cplusplus) && __cplusplus >= 201103L
|
||||||
|
#define NAZARA_COMPILER_SUPPORTS_CPP11
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NAZARA_COMPILER_SUPPORTS_CPP11
|
||||||
#error Nazara requires a C++11 compliant compiler
|
#error Nazara requires a C++11 compliant compiler
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue