diff --git a/doc/pages.doxy b/doc/pages.doxy index 5c6231fd..8fa428c7 100644 --- a/doc/pages.doxy +++ b/doc/pages.doxy @@ -10,7 +10,7 @@ This library works perfectly with OpenGL but it also ensures interoperability with other third party libraries and SDK. It is a good candidate for software rendering (Raytracing / Rasterisation), image processing, physic simulations and any context that requires a simple and convenient mathematics library. GLM is written as a platform independent library with no dependence and officially supports the following compilers: - 1. Clang 2.0 and higher + 1. Clang 2.0 and higher 2. CUDA 3.0 and higher 3. GCC 3.4 and higher 4. LLVM 2.3 through GCC 4.2 front-end and higher diff --git a/doc/src/data.xml b/doc/src/data.xml index dada2e13..583a83d1 100644 --- a/doc/src/data.xml +++ b/doc/src/data.xml @@ -1535,7 +1535,11 @@ This library works perfectly with OpenGL but it also ensures interoperability with other third party libraries and SDKs. It is a good candidate for software rendering (Raytracing / Rasterisation), image processing, physic simulations and any context that requires a simple and convenient mathematics library. - GCC 3.4 and higher + Clang 2.0 and higher + + CUDA 3.0 and higher + + GCC 3.4 and higher LLVM 2.3 through GCC 4.2 front-end and higher Visual C++ 2005 and higher Any C++ compiler following C++98 norm diff --git a/glm/core/setup.hpp b/glm/core/setup.hpp index 0a71b915..e67de0c8 100644 --- a/glm/core/setup.hpp +++ b/glm/core/setup.hpp @@ -24,7 +24,7 @@ // Compiler // User defines: GLM_FORCE_COMPILER_UNKNOWN -// TODO ? __llvm__ __clang__ +// TODO ? __llvm__ #define GLM_COMPILER_UNKNOWN 0x00000000 @@ -82,6 +82,16 @@ #define GLM_COMPILER_CUDA32 0x10000030 #define GLM_COMPILER_CUDA40 0x10000040 +// Clang +#define GLM_COMPILER_CLANG 0x20000000 +#define GLM_COMPILER_CLANG26 0x20000010 +#define GLM_COMPILER_CLANG27 0x20000020 +#define GLM_COMPILER_CLANG28 0x20000030 +#define GLM_COMPILER_CLANG29 0x20000040 + +// LLVM GCC +#define GLM_COMPILER_LLVM_GCC 0x40000000 + // Build model #define GLM_MODEL_32 0x00000010 #define GLM_MODEL_64 0x00000020 @@ -120,6 +130,20 @@ # define GLM_COMPILER GLM_COMPILER_VC # endif//_MSC_VER +#elif defined(__clang__) +# if (__clang_major__ == 2) && (__clang_minor__ == 6) +# define GLM_COMPILER GLM_COMPILER_CLANG26 +# elif (__clang_major__ == 2) && (__clang_minor__ == 7) +# define GLM_COMPILER GLM_COMPILER_CLANG27 +# elif (__clang_major__ == 2) && (__clang_minor__ == 8) +# define GLM_COMPILER GLM_COMPILER_CLANG28 +# elif (__clang_major__ == 2) && (__clang_minor__ == 9) +# define GLM_COMPILER GLM_COMPILER_CLANG29 +# endif + +#elif defined(__llvm__) +# define GLM_COMPILER GLM_COMPILER_LLVM_GCC + // G++ #elif defined(__GNUC__) # if (__GNUC__ == 3) && (__GNUC_MINOR__ == 2) @@ -189,6 +213,10 @@ # pragma message("GLM: CUDA compiler detected") # elif(GLM_COMPILER & GLM_COMPILER_VC) # pragma message("GLM: Visual C++ compiler detected") +# elif(GLM_COMPILER & GLM_COMPILER_CLANG) +# pragma message("GLM: Clang compiler detected") +# elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC) +# pragma message("GLM: LLVM GCC compiler detected") # elif(GLM_COMPILER & GLM_COMPILER_GCC) # pragma message("GLM: GCC compiler detected") # elif(GLM_COMPILER & GLM_COMPILER_BC) diff --git a/readme.txt b/readme.txt index 62d16dfc..9c703b8f 100644 --- a/readme.txt +++ b/readme.txt @@ -17,6 +17,7 @@ http://glm.g-truc.net/glm-0.9.2.pdf GLM 0.9.2.1: 2010-05-20 -------------------------------------------------------------------------------- - Automatically detect CUDA support +- Improved Clang detection - Fixed errors and warnings in VC with C++ extensions disabled - Fixed and tested GLM_GTX_vector_angle - Fixed and tested GLM_GTX_rotate_vector