Improved platform detection

This commit is contained in:
Christophe Riccio 2011-01-19 15:44:05 +00:00
parent abcefb9e77
commit a539e22185
2 changed files with 11 additions and 3 deletions

View File

@ -10,6 +10,11 @@
#ifndef glm_ext #ifndef glm_ext
#define glm_ext #define glm_ext
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED))
# define GLM_MESSAGE_EXT_INCLUDED_DISPLAYED
# pragma message("GLM: All extensions included (not recommanded)")
#endif//GLM_MESSAGE
#include "./gtc/half_float.hpp" #include "./gtc/half_float.hpp"
#include "./gtc/matrix_access.hpp" #include "./gtc/matrix_access.hpp"
#include "./gtc/matrix_inverse.hpp" #include "./gtc/matrix_inverse.hpp"

View File

@ -79,6 +79,9 @@
#define GLM_COMPILER_GCC49 0x02000100 #define GLM_COMPILER_GCC49 0x02000100
#define GLM_COMPILER_GCC50 0x02000200 #define GLM_COMPILER_GCC50 0x02000200
// G++ command line to display defined
// echo "" | g++ -E -dM -x c++ - | sort
// Borland C++ defines. How to identify BC? // Borland C++ defines. How to identify BC?
#define GLM_COMPILER_BC 0x03000000 #define GLM_COMPILER_BC 0x03000000
#define GLM_COMPILER_BCB4 0x03000100 #define GLM_COMPILER_BCB4 0x03000100
@ -209,7 +212,7 @@
# define GLM_MODEL GLM_MODEL_32 # define GLM_MODEL GLM_MODEL_32
# endif//_M_X64 # endif//_M_X64
#elif(GLM_COMPILER & GLM_COMPILER_GCC) #elif(GLM_COMPILER & GLM_COMPILER_GCC)
# if(defined(__WORDSIZE) && (__WORDSIZE == 64)) || defined(__arch64__) || defined(__LP64__) # if(defined(__WORDSIZE) && (__WORDSIZE == 64)) || defined(__arch64__) || defined(__LP64__) || defined(__x86_64__)
# define GLM_MODEL GLM_MODEL_64 # define GLM_MODEL GLM_MODEL_64
# else # else
# define GLM_MODEL GLM_MODEL_32 # define GLM_MODEL GLM_MODEL_32
@ -276,7 +279,7 @@
# else # else
# define GLM_SUPPORT GLM_SUPPORT_PURE # define GLM_SUPPORT GLM_SUPPORT_PURE
# endif # endif
#elif(GLM_COMPILER & GLM_COMPILER_GCC) #elif((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__)))
# if(GLM_COMPILER >= GLM_COMPILER_GCC44) # if(GLM_COMPILER >= GLM_COMPILER_GCC44)
# define GLM_SUPPORT GLM_SUPPORT_AVX # define GLM_SUPPORT GLM_SUPPORT_AVX
# elif(GLM_COMPILER >= GLM_COMPILER_GCC40) # elif(GLM_COMPILER >= GLM_COMPILER_GCC40)