From 8b5e63375f1dfea50f096ec05b880cfd7de5c507 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 23 Sep 2012 15:27:47 +0100 Subject: [PATCH] updated CLang version detection --- glm/core/setup.hpp | 4 ++++ test/core/core_setup_message.cpp | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/glm/core/setup.hpp b/glm/core/setup.hpp index c6fcd32f..75837653 100644 --- a/glm/core/setup.hpp +++ b/glm/core/setup.hpp @@ -282,6 +282,10 @@ # define GLM_COMPILER GLM_COMPILER_CLANG32 # elif(__clang_major__ == 3) && (__clang_minor__ == 3) # define GLM_COMPILER GLM_COMPILER_CLANG33 +# elif(__clang_major__ == 4) && (__clang_minor__ == 0) +# define GLM_COMPILER GLM_COMPILER_CLANG40 +# elif(__clang_major__ == 4) && (__clang_minor__ == 1) +# define GLM_COMPILER GLM_COMPILER_CLANG41 # else # define GLM_COMPILER GLM_COMPILER_CLANG # endif diff --git a/test/core/core_setup_message.cpp b/test/core/core_setup_message.cpp index b77d7bad..c4cad6c0 100644 --- a/test/core/core_setup_message.cpp +++ b/test/core/core_setup_message.cpp @@ -148,8 +148,8 @@ int test_compiler() } else if(GLM_COMPILER & GLM_COMPILER_CLANG) { - std::cout << "GLM_COMPILER_CLANG" << std::endl; - + std::cout << "GLM_COMPILER_CLANG " << __clang_major__ << "." << __clang_minor__ << std::endl; + switch(GLM_COMPILER) { case GLM_COMPILER_CLANG26: @@ -170,9 +170,17 @@ int test_compiler() case GLM_COMPILER_CLANG31: std::cout << "GLM_COMPILER_CLANG31" << std::endl; break; + case GLM_COMPILER_CLANG32: + std::cout << "GLM_COMPILER_CLANG32" << std::endl; + break; + case GLM_COMPILER_CLANG33: + std::cout << "GLM_COMPILER_CLANG33" << std::endl; + break; + case GLM_COMPILER_CLANG33: + std::cout << "GLM_COMPILER_CLANG40" << std::endl; + break; default: std::cout << "Clang version not detected" << std::endl; - Error += 1; break; } }