mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Remove unsupported compiler detection
This commit is contained in:
parent
1de93021bd
commit
6e82d7ba31
@ -125,26 +125,16 @@
|
|||||||
|
|
||||||
// Visual C++ defines
|
// Visual C++ defines
|
||||||
#define GLM_COMPILER_VC 0x01000000
|
#define GLM_COMPILER_VC 0x01000000
|
||||||
#define GLM_COMPILER_VC2 0x01000010
|
#define GLM_COMPILER_VC8 0x01000070
|
||||||
#define GLM_COMPILER_VC4 0x01000020
|
#define GLM_COMPILER_VC9 0x01000080
|
||||||
#define GLM_COMPILER_VC5 0x01000030
|
#define GLM_COMPILER_VC10 0x01000090
|
||||||
#define GLM_COMPILER_VC6 0x01000040
|
#define GLM_COMPILER_VC11 0x010000A0
|
||||||
#define GLM_COMPILER_VC2002 0x01000050
|
#define GLM_COMPILER_VC12 0x010000B0
|
||||||
#define GLM_COMPILER_VC2003 0x01000060
|
|
||||||
#define GLM_COMPILER_VC2005 0x01000070
|
|
||||||
#define GLM_COMPILER_VC2008 0x01000080
|
|
||||||
#define GLM_COMPILER_VC2010 0x01000090
|
|
||||||
#define GLM_COMPILER_VC2012 0x010000A0
|
|
||||||
#define GLM_COMPILER_VC2013 0x010000B0
|
|
||||||
|
|
||||||
// GCC defines
|
// GCC defines
|
||||||
#define GLM_COMPILER_GCC 0x02000000
|
#define GLM_COMPILER_GCC 0x02000000
|
||||||
#define GLM_COMPILER_GCC_LLVM 0x02000001
|
#define GLM_COMPILER_GCC_LLVM 0x02000001
|
||||||
#define GLM_COMPILER_GCC_CLANG 0x02000002
|
#define GLM_COMPILER_GCC_CLANG 0x02000002
|
||||||
#define GLM_COMPILER_GCC30 0x02000010
|
|
||||||
#define GLM_COMPILER_GCC31 0x02000020
|
|
||||||
#define GLM_COMPILER_GCC32 0x02000030
|
|
||||||
#define GLM_COMPILER_GCC33 0x02000040
|
|
||||||
#define GLM_COMPILER_GCC34 0x02000050
|
#define GLM_COMPILER_GCC34 0x02000050
|
||||||
#define GLM_COMPILER_GCC35 0x02000060
|
#define GLM_COMPILER_GCC35 0x02000060
|
||||||
#define GLM_COMPILER_GCC40 0x02000070
|
#define GLM_COMPILER_GCC40 0x02000070
|
||||||
@ -158,16 +148,8 @@
|
|||||||
#define GLM_COMPILER_GCC48 0x020000F0
|
#define GLM_COMPILER_GCC48 0x020000F0
|
||||||
#define GLM_COMPILER_GCC49 0x02000100
|
#define GLM_COMPILER_GCC49 0x02000100
|
||||||
|
|
||||||
// G++ command line to display defined
|
// Borland C++
|
||||||
// echo "" | g++ -E -dM -x c++ - | sort
|
|
||||||
|
|
||||||
// Borland C++ defines. How to identify BC?
|
|
||||||
#define GLM_COMPILER_BC 0x04000000
|
#define GLM_COMPILER_BC 0x04000000
|
||||||
#define GLM_COMPILER_BCB4 0x04000100
|
|
||||||
#define GLM_COMPILER_BCB5 0x04000200
|
|
||||||
#define GLM_COMPILER_BCB6 0x04000300
|
|
||||||
//#define GLM_COMPILER_BCBX 0x04000400 // What's the version value?
|
|
||||||
#define GLM_COMPILER_BCB2009 0x04000500
|
|
||||||
|
|
||||||
// CodeWarrior
|
// CodeWarrior
|
||||||
#define GLM_COMPILER_CODEWARRIOR 0x08000000
|
#define GLM_COMPILER_CODEWARRIOR 0x08000000
|
||||||
@ -241,15 +223,15 @@
|
|||||||
# if _MSC_VER < 1400
|
# if _MSC_VER < 1400
|
||||||
# error "GLM requires Visual C++ 2005 or higher"
|
# error "GLM requires Visual C++ 2005 or higher"
|
||||||
# elif _MSC_VER == 1400
|
# elif _MSC_VER == 1400
|
||||||
# define GLM_COMPILER GLM_COMPILER_VC2005
|
# define GLM_COMPILER GLM_COMPILER_VC8
|
||||||
# elif _MSC_VER == 1500
|
# elif _MSC_VER == 1500
|
||||||
# define GLM_COMPILER GLM_COMPILER_VC2008
|
# define GLM_COMPILER GLM_COMPILER_VC9
|
||||||
# elif _MSC_VER == 1600
|
# elif _MSC_VER == 1600
|
||||||
# define GLM_COMPILER GLM_COMPILER_VC2010
|
# define GLM_COMPILER GLM_COMPILER_VC10
|
||||||
# elif _MSC_VER == 1700
|
# elif _MSC_VER == 1700
|
||||||
# define GLM_COMPILER GLM_COMPILER_VC2012
|
# define GLM_COMPILER GLM_COMPILER_VC11
|
||||||
# elif _MSC_VER >= 1800
|
# elif _MSC_VER >= 1800
|
||||||
# define GLM_COMPILER GLM_COMPILER_VC2013
|
# define GLM_COMPILER GLM_COMPILER_VC12
|
||||||
# else//_MSC_VER
|
# else//_MSC_VER
|
||||||
# define GLM_COMPILER GLM_COMPILER_VC
|
# define GLM_COMPILER GLM_COMPILER_VC
|
||||||
# endif//_MSC_VER
|
# endif//_MSC_VER
|
||||||
@ -290,11 +272,7 @@
|
|||||||
|
|
||||||
// G++
|
// G++
|
||||||
#elif(defined(__GNUC__) || defined(__MINGW32__))// || defined(__llvm__) || defined(__clang__)
|
#elif(defined(__GNUC__) || defined(__MINGW32__))// || defined(__llvm__) || defined(__clang__)
|
||||||
# if (__GNUC__ == 3) && (__GNUC_MINOR__ == 2)
|
# if (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)
|
||||||
# define GLM_COMPILER GLM_COMPILER_GCC32
|
|
||||||
# elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 3)
|
|
||||||
# define GLM_COMPILER GLM_COMPILER_GCC33
|
|
||||||
# elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)
|
|
||||||
# define GLM_COMPILER GLM_COMPILER_GCC34
|
# define GLM_COMPILER GLM_COMPILER_GCC34
|
||||||
# elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 5)
|
# elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 5)
|
||||||
# define GLM_COMPILER GLM_COMPILER_GCC35
|
# define GLM_COMPILER GLM_COMPILER_GCC35
|
||||||
@ -404,18 +382,22 @@
|
|||||||
#define GLM_LANG_CXX03_FLAG (1 << 2)
|
#define GLM_LANG_CXX03_FLAG (1 << 2)
|
||||||
#define GLM_LANG_CXX0X_FLAG (1 << 3)
|
#define GLM_LANG_CXX0X_FLAG (1 << 3)
|
||||||
#define GLM_LANG_CXX11_FLAG (1 << 4)
|
#define GLM_LANG_CXX11_FLAG (1 << 4)
|
||||||
#define GLM_LANG_CXXMS_FLAG (1 << 5)
|
#define GLM_LANG_CXX1Y_FLAG (1 << 5)
|
||||||
#define GLM_LANG_CXXGNU_FLAG (1 << 6)
|
#define GLM_LANG_CXXMS_FLAG (1 << 6)
|
||||||
|
#define GLM_LANG_CXXGNU_FLAG (1 << 7)
|
||||||
|
|
||||||
#define GLM_LANG_CXX GLM_LANG_CXX_FLAG
|
#define GLM_LANG_CXX GLM_LANG_CXX_FLAG
|
||||||
#define GLM_LANG_CXX98 (GLM_LANG_CXX | GLM_LANG_CXX98_FLAG)
|
#define GLM_LANG_CXX98 (GLM_LANG_CXX | GLM_LANG_CXX98_FLAG)
|
||||||
#define GLM_LANG_CXX03 (GLM_LANG_CXX98 | GLM_LANG_CXX03_FLAG)
|
#define GLM_LANG_CXX03 (GLM_LANG_CXX98 | GLM_LANG_CXX03_FLAG)
|
||||||
#define GLM_LANG_CXX0X (GLM_LANG_CXX03 | GLM_LANG_CXX0X_FLAG)
|
#define GLM_LANG_CXX0X (GLM_LANG_CXX03 | GLM_LANG_CXX0X_FLAG)
|
||||||
#define GLM_LANG_CXX11 (GLM_LANG_CXX0X | GLM_LANG_CXX11_FLAG)
|
#define GLM_LANG_CXX11 (GLM_LANG_CXX0X | GLM_LANG_CXX11_FLAG)
|
||||||
|
#define GLM_LANG_CXX1Y (GLM_LANG_CXX11 | GLM_LANG_CXX1Y_FLAG)
|
||||||
#define GLM_LANG_CXXMS GLM_LANG_CXXMS_FLAG
|
#define GLM_LANG_CXXMS GLM_LANG_CXXMS_FLAG
|
||||||
#define GLM_LANG_CXXGNU GLM_LANG_CXXGNU_FLAG
|
#define GLM_LANG_CXXGNU GLM_LANG_CXXGNU_FLAG
|
||||||
|
|
||||||
#if(defined(GLM_FORCE_CXX11))
|
#if(defined(GLM_FORCE_CXX1Y))
|
||||||
|
# define GLM_LANG GLM_LANG_CXX1Y
|
||||||
|
#elif(defined(GLM_FORCE_CXX11))
|
||||||
# define GLM_LANG GLM_LANG_CXX11
|
# define GLM_LANG GLM_LANG_CXX11
|
||||||
#elif(defined(GLM_FORCE_CXX03))
|
#elif(defined(GLM_FORCE_CXX03))
|
||||||
# define GLM_LANG GLM_LANG_CXX03
|
# define GLM_LANG GLM_LANG_CXX03
|
||||||
@ -445,13 +427,13 @@
|
|||||||
# endif
|
# endif
|
||||||
# elif(GLM_COMPILER & GLM_COMPILER_VC)
|
# elif(GLM_COMPILER & GLM_COMPILER_VC)
|
||||||
# if(defined(_MSC_EXTENSIONS))
|
# if(defined(_MSC_EXTENSIONS))
|
||||||
# if(GLM_COMPILER >= GLM_COMPILER_VC2010)
|
# if(GLM_COMPILER >= GLM_COMPILER_VC10)
|
||||||
# define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
|
# define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
|
||||||
# else
|
# else
|
||||||
# define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
|
# define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# if(GLM_COMPILER >= GLM_COMPILER_VC2010)
|
# if(GLM_COMPILER >= GLM_COMPILER_VC10)
|
||||||
# define GLM_LANG GLM_LANG_CXX0X
|
# define GLM_LANG GLM_LANG_CXX0X
|
||||||
# else
|
# else
|
||||||
# define GLM_LANG GLM_LANG_CXX98
|
# define GLM_LANG GLM_LANG_CXX98
|
||||||
@ -536,17 +518,17 @@
|
|||||||
# define GLM_ARCH GLM_ARCH_PURE
|
# define GLM_ARCH GLM_ARCH_PURE
|
||||||
# endif
|
# endif
|
||||||
*/
|
*/
|
||||||
# elif(GLM_COMPILER >= GLM_COMPILER_VC2012)
|
# elif(GLM_COMPILER >= GLM_COMPILER_VC11)
|
||||||
# define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
# define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
||||||
# elif(GLM_COMPILER >= GLM_COMPILER_VC2010)
|
# elif(GLM_COMPILER >= GLM_COMPILER_VC10)
|
||||||
# if(_MSC_FULL_VER >= 160031118) //160031118: VC2010 SP1 beta full version
|
# if(_MSC_FULL_VER >= 160031118) //160031118: VC2010 SP1 beta full version
|
||||||
# define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)//GLM_ARCH_AVX (Require SP1)
|
# define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)//GLM_ARCH_AVX (Require SP1)
|
||||||
# else
|
# else
|
||||||
# define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
# define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
||||||
# endif
|
# endif
|
||||||
# elif(GLM_COMPILER >= GLM_COMPILER_VC2008)
|
# elif(GLM_COMPILER >= GLM_COMPILER_VC9)
|
||||||
# define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
# define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
||||||
# elif(GLM_COMPILER >= GLM_COMPILER_VC2005)
|
# elif(GLM_COMPILER >= GLM_COMPILER_VC8)
|
||||||
# define GLM_ARCH GLM_ARCH_SSE2
|
# define GLM_ARCH GLM_ARCH_SSE2
|
||||||
# else
|
# else
|
||||||
# define GLM_ARCH GLM_ARCH_PURE
|
# define GLM_ARCH GLM_ARCH_PURE
|
||||||
|
@ -286,23 +286,12 @@ namespace glm
|
|||||||
|
|
||||||
//! Return the address to the data of the matrix input.
|
//! Return the address to the data of the matrix input.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
template<typename T>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3<T> & mat)
|
GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3<T, P> & mat)
|
||||||
{
|
{
|
||||||
return &(mat[0].x);
|
return &(mat[0].x);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return the constant address to the data of the quaternion input.
|
|
||||||
/// @see gtc_type_ptr
|
|
||||||
template<typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER T * value_ptr
|
|
||||||
(
|
|
||||||
detail::tquat<T, P> & q
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return &(q[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Return the constant address to the data of the input parameter.
|
//! Return the constant address to the data of the input parameter.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
@ -316,10 +305,10 @@ namespace glm
|
|||||||
|
|
||||||
//! Return the address to the data of the quaternion input.
|
//! Return the address to the data of the quaternion input.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
template<typename T>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T * value_ptr
|
GLM_FUNC_QUALIFIER T * value_ptr
|
||||||
(
|
(
|
||||||
detail::tquat<T> & q
|
detail::tquat<T, P> & q
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return &(q[0]);
|
return &(q[0]);
|
||||||
|
@ -51,6 +51,7 @@ GLM 0.9.5.0: 2013-XX-XX
|
|||||||
- Removed GTX_ocl_type extension
|
- Removed GTX_ocl_type extension
|
||||||
- Fixed post increment and decrement operators
|
- Fixed post increment and decrement operators
|
||||||
- Fixed perspective with zNear == 0 (#71)
|
- Fixed perspective with zNear == 0 (#71)
|
||||||
|
- Clean up compiler detection code for unsupported compilers
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
GLM 0.9.4.6: 2013-08-XX
|
GLM 0.9.4.6: 2013-08-XX
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Created : 2011-05-31
|
// Created : 2011-05-31
|
||||||
// Updated : 2011-05-31
|
// Updated : 2013-08-27
|
||||||
// Licence : This source is under MIT License
|
// Licence : This source is under MIT License
|
||||||
// File : test/core/setup_message.cpp
|
// File : test/core/setup_message.cpp
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -21,38 +21,20 @@ int test_compiler()
|
|||||||
|
|
||||||
switch(GLM_COMPILER)
|
switch(GLM_COMPILER)
|
||||||
{
|
{
|
||||||
case GLM_COMPILER_VC2:
|
case GLM_COMPILER_VC8:
|
||||||
std::cout << "GLM_COMPILER_VC2" << std::endl;
|
std::cout << "GLM_COMPILER_VC8" << std::endl;
|
||||||
break;
|
break;
|
||||||
case GLM_COMPILER_VC4:
|
case GLM_COMPILER_VC9:
|
||||||
std::cout << "GLM_COMPILER_VC4" << std::endl;
|
std::cout << "GLM_COMPILER_VC9" << std::endl;
|
||||||
break;
|
break;
|
||||||
case GLM_COMPILER_VC5:
|
case GLM_COMPILER_VC10:
|
||||||
std::cout << "GLM_COMPILER_VC5" << std::endl;
|
std::cout << "GLM_COMPILER_VC10" << std::endl;
|
||||||
break;
|
break;
|
||||||
case GLM_COMPILER_VC6:
|
case GLM_COMPILER_VC11:
|
||||||
std::cout << "GLM_COMPILER_VC6" << std::endl;
|
std::cout << "GLM_COMPILER_VC11" << std::endl;
|
||||||
break;
|
break;
|
||||||
case GLM_COMPILER_VC2002:
|
case GLM_COMPILER_VC12:
|
||||||
std::cout << "GLM_COMPILER_VC2002" << std::endl;
|
std::cout << "GLM_COMPILER_VC12" << std::endl;
|
||||||
break;
|
|
||||||
case GLM_COMPILER_VC2003:
|
|
||||||
std::cout << "GLM_COMPILER_VC2003" << std::endl;
|
|
||||||
break;
|
|
||||||
case GLM_COMPILER_VC2005:
|
|
||||||
std::cout << "GLM_COMPILER_VC2005" << std::endl;
|
|
||||||
break;
|
|
||||||
case GLM_COMPILER_VC2008:
|
|
||||||
std::cout << "GLM_COMPILER_VC2008" << std::endl;
|
|
||||||
break;
|
|
||||||
case GLM_COMPILER_VC2010:
|
|
||||||
std::cout << "GLM_COMPILER_VC2010" << std::endl;
|
|
||||||
break;
|
|
||||||
case GLM_COMPILER_VC2012:
|
|
||||||
std::cout << "GLM_COMPILER_VC2012" << std::endl;
|
|
||||||
break;
|
|
||||||
case GLM_COMPILER_VC2013:
|
|
||||||
std::cout << "GLM_COMPILER_VC2013" << std::endl;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
std::cout << "Visual C++ version not detected" << std::endl;
|
std::cout << "Visual C++ version not detected" << std::endl;
|
||||||
@ -66,18 +48,6 @@ int test_compiler()
|
|||||||
|
|
||||||
switch(GLM_COMPILER)
|
switch(GLM_COMPILER)
|
||||||
{
|
{
|
||||||
case GLM_COMPILER_GCC30:
|
|
||||||
std::cout << "GLM_COMPILER_GCC30" << std::endl;
|
|
||||||
break;
|
|
||||||
case GLM_COMPILER_GCC31:
|
|
||||||
std::cout << "GLM_COMPILER_GCC31" << std::endl;
|
|
||||||
break;
|
|
||||||
case GLM_COMPILER_GCC32:
|
|
||||||
std::cout << "GLM_COMPILER_GCC32" << std::endl;
|
|
||||||
break;
|
|
||||||
case GLM_COMPILER_GCC33:
|
|
||||||
std::cout << "GLM_COMPILER_GCC33" << std::endl;
|
|
||||||
break;
|
|
||||||
case GLM_COMPILER_GCC34:
|
case GLM_COMPILER_GCC34:
|
||||||
std::cout << "GLM_COMPILER_GCC34" << std::endl;
|
std::cout << "GLM_COMPILER_GCC34" << std::endl;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user