mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 17:04:35 +00:00
Added detection of Visual C++ 2017 toolsets
This commit is contained in:
parent
f889ac0bfe
commit
13ef0f92bc
@ -324,20 +324,6 @@
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CLANG)))
|
||||
#endif
|
||||
|
||||
// N2235
|
||||
#if GLM_COMPILER & GLM_COMPILER_CLANG
|
||||
# define GLM_HAS_CONSTEXPR __has_feature(cxx_constexpr)
|
||||
# define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR
|
||||
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||
# define GLM_HAS_CONSTEXPR 1
|
||||
# define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR
|
||||
#else
|
||||
# define GLM_HAS_CONSTEXPR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)))) // GCC 4.6 support constexpr but there is a compiler bug causing a crash
|
||||
# define GLM_HAS_CONSTEXPR_PARTIAL (GLM_HAS_CONSTEXPR || ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14)))
|
||||
#endif
|
||||
|
||||
// N2672
|
||||
#if GLM_COMPILER & GLM_COMPILER_CLANG
|
||||
# define GLM_HAS_INITIALIZER_LISTS __has_feature(cxx_generalized_initializers)
|
||||
@ -447,10 +433,12 @@
|
||||
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||
# define GLM_HAS_CONSTEXPR_CXX11 1
|
||||
#else
|
||||
// GCC 4.6 support constexpr but there is a compiler bug causing a crash
|
||||
// Visual C++ has a bug #594 https://github.com/g-truc/glm/issues/594
|
||||
# define GLM_HAS_CONSTEXPR_CXX11 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14) && (GLM_ARCH == GLM_ARCH_PURE)))) // Visual C++ has a bug #594 https://github.com/g-truc/glm/issues/594
|
||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14) && (GLM_ARCH == GLM_ARCH_PURE))))
|
||||
#endif
|
||||
|
||||
#if GLM_HAS_CONSTEXPR_CXX11
|
||||
@ -468,7 +456,7 @@
|
||||
# define GLM_HAS_CONSTEXPR_CXX14 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC50)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL17)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14) && (GLM_ARCH == GLM_ARCH_PURE))))
|
||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15) && (GLM_ARCH == GLM_ARCH_PURE))))
|
||||
#endif
|
||||
|
||||
#if GLM_HAS_CONSTEXPR_CXX14
|
||||
|
@ -84,10 +84,13 @@
|
||||
|
||||
// Visual C++ defines
|
||||
#define GLM_COMPILER_VC 0x01000000
|
||||
#define GLM_COMPILER_VC12 0x010000B0
|
||||
#define GLM_COMPILER_VC14 0x010000C0
|
||||
#define GLM_COMPILER_VC15 0x010000D0
|
||||
#define GLM_COMPILER_VC16 0x010000E0
|
||||
#define GLM_COMPILER_VC12 0x01000001
|
||||
#define GLM_COMPILER_VC14 0x01000002
|
||||
#define GLM_COMPILER_VC15 0x01000003
|
||||
#define GLM_COMPILER_VC15_3 0x01000004
|
||||
#define GLM_COMPILER_VC15_5 0x01000005
|
||||
#define GLM_COMPILER_VC15_6 0x01000006
|
||||
#define GLM_COMPILER_VC15_7 0x01000007
|
||||
|
||||
// GCC defines
|
||||
#define GLM_COMPILER_GCC 0x02000000
|
||||
@ -200,8 +203,16 @@
|
||||
# define GLM_COMPILER GLM_COMPILER_VC12
|
||||
# elif _MSC_VER == 1900
|
||||
# define GLM_COMPILER GLM_COMPILER_VC14
|
||||
# elif _MSC_VER >= 1910
|
||||
# elif _MSC_VER == 1910
|
||||
# define GLM_COMPILER GLM_COMPILER_VC15
|
||||
# elif _MSC_VER == 1911
|
||||
# define GLM_COMPILER GLM_COMPILER_VC15_3
|
||||
# elif _MSC_VER == 1912
|
||||
# define GLM_COMPILER GLM_COMPILER_VC15_5
|
||||
# elif _MSC_VER == 1913
|
||||
# define GLM_COMPILER GLM_COMPILER_VC15_6
|
||||
# elif _MSC_VER >= 1914
|
||||
# define GLM_COMPILER GLM_COMPILER_VC15_7
|
||||
# endif//_MSC_VER
|
||||
|
||||
// G++
|
||||
|
@ -58,6 +58,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
|
||||
#### Improvements:
|
||||
- Added missing vec1 based constructors
|
||||
- Redesigned constexpr support which requires disable GLM SIMD on Visual C++ #783
|
||||
- Added detection of Visual C++ 2017 toolsets
|
||||
|
||||
#### Fixes:
|
||||
- Fixed build problems due to printf and std::clock_t #778
|
||||
|
@ -19,8 +19,17 @@ int test_compiler()
|
||||
case GLM_COMPILER_VC15:
|
||||
std::printf("Visual C++ 15 - 2017\n");
|
||||
break;
|
||||
case GLM_COMPILER_VC16:
|
||||
std::printf("Visual C++ 16 - 20XX\n");
|
||||
case GLM_COMPILER_VC15_3:
|
||||
std::printf("Visual C++ 15.3 - 2017\n");
|
||||
break;
|
||||
case GLM_COMPILER_VC15_5:
|
||||
std::printf("Visual C++ 15.5 - 2017\n");
|
||||
break;
|
||||
case GLM_COMPILER_VC15_6:
|
||||
std::printf("Visual C++ 15.6 - 2017\n");
|
||||
break;
|
||||
case GLM_COMPILER_VC15_7:
|
||||
std::printf("Visual C++ 15.7 - 2017\n");
|
||||
break;
|
||||
default:
|
||||
std::printf("Visual C++ version not detected\n");
|
||||
|
Loading…
Reference in New Issue
Block a user