Updated VC support compilers list
This commit is contained in:
parent
8d9c4596b3
commit
2d48d922bd
@ -122,11 +122,10 @@
|
||||
|
||||
// Visual C++ defines
|
||||
#define GLM_COMPILER_VC 0x01000000
|
||||
#define GLM_COMPILER_VC10 0x01000090
|
||||
#define GLM_COMPILER_VC11 0x010000A0
|
||||
#define GLM_COMPILER_VC12 0x010000B0
|
||||
#define GLM_COMPILER_VC13 0x010000C0
|
||||
#define GLM_COMPILER_VC14 0x010000D0
|
||||
#define GLM_COMPILER_VC2010 0x01000090
|
||||
#define GLM_COMPILER_VC2012 0x010000A0
|
||||
#define GLM_COMPILER_VC2013 0x010000B0
|
||||
#define GLM_COMPILER_VC2015 0x010000C0
|
||||
|
||||
// GCC defines
|
||||
#define GLM_COMPILER_GCC 0x02000000
|
||||
@ -206,20 +205,16 @@
|
||||
|
||||
// Visual C++
|
||||
#elif defined(_MSC_VER)
|
||||
# if _MSC_VER < 1400
|
||||
# error "GLM requires Visual C++ 2005 or higher"
|
||||
# elif _MSC_VER == 1400
|
||||
# define GLM_COMPILER GLM_COMPILER_VC8
|
||||
# elif _MSC_VER == 1500
|
||||
# define GLM_COMPILER GLM_COMPILER_VC9
|
||||
# if _MSC_VER < 1600
|
||||
# error "GLM requires Visual C++ 2010 or higher"
|
||||
# elif _MSC_VER == 1600
|
||||
# define GLM_COMPILER GLM_COMPILER_VC10
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2010
|
||||
# elif _MSC_VER == 1700
|
||||
# define GLM_COMPILER GLM_COMPILER_VC11
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2012
|
||||
# elif _MSC_VER == 1800
|
||||
# define GLM_COMPILER GLM_COMPILER_VC12
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2013
|
||||
# elif _MSC_VER >= 1900
|
||||
# define GLM_COMPILER GLM_COMPILER_VC13
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2015
|
||||
# else//_MSC_VER
|
||||
# define GLM_COMPILER GLM_COMPILER_VC
|
||||
# endif//_MSC_VER
|
||||
@ -385,13 +380,13 @@
|
||||
# endif
|
||||
# elif GLM_COMPILER & GLM_COMPILER_VC
|
||||
# ifdef _MSC_EXTENSIONS
|
||||
# if GLM_COMPILER >= GLM_COMPILER_VC10
|
||||
# if GLM_COMPILER >= GLM_COMPILER_VC2010
|
||||
# define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
|
||||
# else
|
||||
# define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
|
||||
# endif
|
||||
# else
|
||||
# if GLM_COMPILER >= GLM_COMPILER_VC10
|
||||
# if GLM_COMPILER >= GLM_COMPILER_VC2010
|
||||
# define GLM_LANG GLM_LANG_CXX0X
|
||||
# else
|
||||
# define GLM_LANG GLM_LANG_CXX98
|
||||
@ -461,19 +456,19 @@
|
||||
// N1720
|
||||
#define GLM_HAS_CXX11_STL ( \
|
||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC13)))
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2015)))
|
||||
|
||||
// N1720
|
||||
#define GLM_HAS_STATIC_ASSERT ( \
|
||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC10)) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2010)) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
|
||||
__has_feature(cxx_static_assert))
|
||||
|
||||
// N1988
|
||||
#define GLM_HAS_EXTENDED_INTEGER_TYPE ( \
|
||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11)) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CLANG) && (GLM_COMPILER >= GLM_COMPILER_CLANG29)))
|
||||
|
||||
@ -486,7 +481,7 @@
|
||||
// N2672
|
||||
#define GLM_HAS_INITIALIZER_LISTS ( \
|
||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12))) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013))) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \
|
||||
__has_feature(cxx_generalized_initializers))
|
||||
|
||||
@ -500,30 +495,30 @@
|
||||
// N2346
|
||||
#define GLM_HAS_DEFAULTED_FUNCTIONS ( \
|
||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12))) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013))) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \
|
||||
__has_feature(cxx_defaulted_functions))
|
||||
|
||||
// N2118
|
||||
#define GLM_HAS_RVALUE_REFERENCES ( \
|
||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11))) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012))) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
|
||||
__has_feature(cxx_rvalue_references))
|
||||
|
||||
#define GLM_HAS_STL_ARRAY ( \
|
||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC10))) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2010))) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)))
|
||||
|
||||
#define GLM_HAS_TEMPLATE_ALIASES ( \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12))) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013))) || \
|
||||
__has_feature(cxx_alias_templates))
|
||||
//((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC47)) || \
|
||||
|
||||
#define GLM_HAS_RANGE_FOR ( \
|
||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11))) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012))) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
|
||||
__has_feature(cxx_range_for))
|
||||
|
||||
@ -533,11 +528,11 @@
|
||||
|
||||
#define GLM_HAS_TRIVIAL_QUERIES (\
|
||||
((GLM_LANG & GLM_LANG_CXX11_FLAG) && !(GLM_COMPILER & GLM_COMPILER_GCC)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)))
|
||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
|
||||
|
||||
#define GLM_HAS_MAKE_SIGNED (\
|
||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)))
|
||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
|
||||
|
||||
// OpenMP
|
||||
#ifdef _OPENMP
|
||||
@ -552,7 +547,7 @@
|
||||
# endif// GLM_COMPILER & GLM_COMPILER_GCC
|
||||
|
||||
# if GLM_COMPILER & GLM_COMPILER_VC
|
||||
# if GLM_COMPILER >= GLM_COMPILER_VC10
|
||||
# if GLM_COMPILER >= GLM_COMPILER_VC2010
|
||||
# define GLM_HAS_OPENMP 20
|
||||
# endif
|
||||
# endif// GLM_COMPILER & GLM_COMPILER_VC
|
||||
@ -644,7 +639,7 @@
|
||||
#endif//GLM_ARCH
|
||||
#if GLM_ARCH & GLM_ARCH_SSE2
|
||||
# include <emmintrin.h>
|
||||
# if(GLM_COMPILER == GLM_COMPILER_VC8) // VC8 is missing some intrinsics, workaround
|
||||
# if(GLM_COMPILER == GLM_COMPILER_VC2005) // VC2005 is missing some intrinsics, workaround
|
||||
inline float _mm_cvtss_f32(__m128 A) { return A.m128_f32[0]; }
|
||||
inline __m128 _mm_castpd_ps(__m128d PD) { union { __m128 ps; __m128d pd; } c; c.pd = PD; return c.ps; }
|
||||
inline __m128d _mm_castps_pd(__m128 PS) { union { __m128 ps; __m128d pd; } c; c.ps = PS; return c.pd; }
|
||||
|
@ -23,7 +23,7 @@ namespace detail
|
||||
return std::string();
|
||||
|
||||
va_start(list, msg);
|
||||
# if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC8))
|
||||
# if(GLM_COMPILER & GLM_COMPILER_VC)
|
||||
vsprintf_s(text, STRING_BUFFER, msg, list);
|
||||
# else//
|
||||
vsprintf(text, msg, list);
|
||||
|
@ -19,20 +19,17 @@ int test_compiler()
|
||||
{
|
||||
switch(GLM_COMPILER)
|
||||
{
|
||||
case GLM_COMPILER_VC10:
|
||||
std::printf("GLM_COMPILER_VC10\n");
|
||||
case GLM_COMPILER_VC2010:
|
||||
std::printf("GLM_COMPILER_VC2010\n");
|
||||
break;
|
||||
case GLM_COMPILER_VC11:
|
||||
std::printf("GLM_COMPILER_VC11\n");
|
||||
case GLM_COMPILER_VC2012:
|
||||
std::printf("GLM_COMPILER_VC2012\n");
|
||||
break;
|
||||
case GLM_COMPILER_VC12:
|
||||
std::printf("GLM_COMPILER_VC12\n");
|
||||
case GLM_COMPILER_VC2013:
|
||||
std::printf("GLM_COMPILER_VC2013\n");
|
||||
break;
|
||||
case GLM_COMPILER_VC13:
|
||||
std::printf("GLM_COMPILER_VC13\n");
|
||||
break;
|
||||
case GLM_COMPILER_VC14:
|
||||
std::printf("GLM_COMPILER_VC14\n");
|
||||
case GLM_COMPILER_VC2015:
|
||||
std::printf("GLM_COMPILER_VC2015\n");
|
||||
break;
|
||||
default:
|
||||
std::printf("Visual C++ version not detected\n");
|
||||
|
Loading…
Reference in New Issue
Block a user