diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 926ef001..7d50f814 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -535,19 +535,41 @@ // OpenMP #ifdef _OPENMP # if GLM_COMPILER & GLM_COMPILER_GCC -# if GLM_COMPILER >= GLM_COMPILER_GCC47 +# if GLM_COMPILER >= GLM_COMPILER_GCC61 +# define GLM_HAS_OPENMP 45 +# elif GLM_COMPILER >= GLM_COMPILER_GCC49 +# define GLM_HAS_OPENMP 40 +# elif GLM_COMPILER >= GLM_COMPILER_GCC47 # define GLM_HAS_OPENMP 31 # elif GLM_COMPILER >= GLM_COMPILER_GCC44 # define GLM_HAS_OPENMP 30 # elif GLM_COMPILER >= GLM_COMPILER_GCC42 # define GLM_HAS_OPENMP 25 +# else +# define GLM_HAS_OPENMP 0 # endif -# endif// GLM_COMPILER & GLM_COMPILER_GCC - -# if GLM_COMPILER & GLM_COMPILER_VC +# elif GLM_COMPILER & GLM_COMPILER_LLVM +# if GLM_COMPILER >= GLM_COMPILER_LLVM38 +# define GLM_HAS_OPENMP 31 +# else +# define GLM_HAS_OPENMP 0 +# endif +# elif GLM_COMPILER & GLM_COMPILER_VC # if GLM_COMPILER >= GLM_COMPILER_VC2010 # define GLM_HAS_OPENMP 20 +# else +# define GLM_HAS_OPENMP 0 # endif +# elif GLM_COMPILER & GLM_COMPILER_INTEL +# if GLM_COMPILER >= GLM_COMPILER_INTEL16 +# define GLM_HAS_OPENMP 40 +# elif GLM_COMPILER >= GLM_COMPILER_INTEL12 +# define GLM_HAS_OPENMP 31 +# else +# define GLM_HAS_OPENMP 0 +# endif +# else +# define GLM_HAS_OPENMP 0 # endif// GLM_COMPILER & GLM_COMPILER_VC #endif diff --git a/readme.md b/readme.md index c9fc6b8f..56c1a275 100644 --- a/readme.md +++ b/readme.md @@ -67,6 +67,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Improved GTC_random linearRand documentation - Improved GTC_reciprocal documentation - Improved GLM_FORCE_EXPLICIT_CTOR coverage #481 +- Improved OpenMP support detection for Clang, GCC, ICC and VC ##### Fixes: - Fixed GTX_extended_min_max filename typo #386