From ac21d7bdad6f0fa6a3195360d49045e0a8035463 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 19 Jul 2015 17:59:21 +0200 Subject: [PATCH] Fixed use of libstdc++ with Clang #351 --- glm/detail/setup.hpp | 11 ++++++++++- readme.md | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index c27b40d29..199652e21 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -538,7 +538,16 @@ #if GLM_PLATFORM == GLM_PLATFORM_ANDROID # define GLM_HAS_CXX11_STL 0 #elif GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG) -# define GLM_HAS_CXX11_STL __has_include("__config") +# if __has_include(<__config>) // libc++ +# include <__config> +//# else // libstdc++ +//# include +# endif +# if defined(_LIBCPP_VERSION)// || defined(__GLIBCXX__) +# define GLM_HAS_CXX11_STL 1 +# else +# define GLM_HAS_CXX11_STL 0 +# endif #else # define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && \ ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \ diff --git a/readme.md b/readme.md index 603f58fc4..96a131eb6 100644 --- a/readme.md +++ b/readme.md @@ -77,6 +77,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Removed -m64 causing build issues on Linux 32 #331 - Fixed isfinite with C++98 compilers #343 - Fixed Intel compiler build error on Linux #354 +- Fixed use of libstdc++ with Clang #351 ##### Deprecation: - Removed integer specification for 'mod' in GTC_integer #308