mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 01:14:34 +00:00
Automatic use of C++ 0x
This commit is contained in:
parent
2a9bf3951a
commit
691f665a23
@ -129,7 +129,7 @@
|
|||||||
|
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
|
|
||||||
#if(defined(__WORDSIZE) && (__WORDSIZE == 64)) || defined(__arch64__)
|
#if(defined(__WORDSIZE) && (__WORDSIZE == 64)) || defined(__arch64__) || defined(__LP64__)
|
||||||
#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
|
||||||
@ -201,6 +201,23 @@
|
|||||||
#error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message."
|
#error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message."
|
||||||
#endif//GLM_MODEL
|
#endif//GLM_MODEL
|
||||||
|
|
||||||
|
/////////////////
|
||||||
|
// C++ Version //
|
||||||
|
|
||||||
|
#define GLM_CPP98 1
|
||||||
|
#define GLM_CPP0X 2
|
||||||
|
|
||||||
|
#if((GLM_COMPILER & GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__)) // -std=c++0x or -std=gnu++0x
|
||||||
|
# define GLM_CPP GLM_CPP0X
|
||||||
|
#elif GLM_COMPILER & GLM_COMPILER_VC2010
|
||||||
|
# define GLM_CPP GLM_CPP0X
|
||||||
|
#else
|
||||||
|
# define GLM_CPP GLM_CPP98
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/////////////
|
||||||
|
// Message //
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGE) && (GLM_MESSAGE & (GLM_MESSAGE_SETUP | GLM_MESSAGE_NOTIFICATION)))
|
#if(defined(GLM_MESSAGE) && (GLM_MESSAGE & (GLM_MESSAGE_SETUP | GLM_MESSAGE_NOTIFICATION)))
|
||||||
# if(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_VC)
|
# if(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_VC)
|
||||||
# pragma message("GLM message: Compiled with Visual C++")
|
# pragma message("GLM message: Compiled with Visual C++")
|
||||||
@ -376,8 +393,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Static assert
|
// Static assert
|
||||||
|
|
||||||
// TODO: Added static_assert support for G++ when C++0x is used.
|
#if(GLM_CPP == GLM_CPP0X)
|
||||||
#if((GLM_COMPILER & GLM_COMPILER_VC && GLM_COMPILER >= GLM_COMPILER_VC2010) || (GLM_COMPILER & GLM_COMPILER_GCC && GLM_COMPILER >= GLM_COMPILER_GCC47))
|
|
||||||
# define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
|
# define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
|
||||||
#elif(defined(BOOST_STATIC_ASSERT))
|
#elif(defined(BOOST_STATIC_ASSERT))
|
||||||
# define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)
|
# define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)
|
||||||
|
Loading…
Reference in New Issue
Block a user