summaryrefslogtreecommitdiff
path: root/external/glm
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-12-01 12:43:57 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-12-02 08:02:26 +0100
commitd691bf7d6501c89c3178aacc5772ac3fdc8b3c4c (patch)
tree93b45b0a079bb58600a5a31450b24f380efb54b9 /external/glm
parent7ae1c3520a607ee7b542b5eeaae3d1d0a7e6f362 (diff)
external/glm: Fix check for availability of C++11 static_assert
Change-Id: I0d24bcdfeb0d004607569da089c9f787a868da72
Diffstat (limited to 'external/glm')
-rw-r--r--external/glm/clang-cl.patch.018
1 files changed, 18 insertions, 0 deletions
diff --git a/external/glm/clang-cl.patch.0 b/external/glm/clang-cl.patch.0
index 9e3afc97fa1c..edbc30b2408b 100644
--- a/external/glm/clang-cl.patch.0
+++ b/external/glm/clang-cl.patch.0
@@ -12,3 +12,21 @@
#endif//(GLM_COMPILER & GLM_COMPILER_VC)
#endif//(GLM_ARCH != GLM_ARCH_PURE)
+
+# Fix check for availability of C++11 static_assert (it apparently should be
+# conditional on GLM_LANG_CXX11 instead of GLM_LANG_CXX0X, but just don't care
+# to try to fix that mess, and use __cplusplus value instead; unconditionally
+# using C++11 static_assert would fail in external/libgltf, which uses
+# external/glm but does not -std=c++11); falling back to BOOST_STATIC_ASSERT
+# would cause unnecessary warnings with clang-cl:
+--- glm/core/setup.hpp
++++ glm/core/setup.hpp
+@@ -628,7 +628,7 @@
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ // Static assert
+
+-#if(GLM_LANG == GLM_LANG_CXX0X)
++#if __cplusplus >= 201103L
+ # define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
+ #elif(defined(BOOST_STATIC_ASSERT))
+ # define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)