From 4f7afb272fb3816e1f4a9b79cfb3f0ae7d5ec699 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 19 Jul 2015 01:46:49 +0200 Subject: [PATCH] Fixed GCC build, GLM_META_PROG_HELPERS unsupported with GCC 4.6 --- test/core/core_type_vec1.cpp | 9 +++++++-- test/core/core_type_vec2.cpp | 9 +++++++-- test/core/core_type_vec3.cpp | 9 +++++++-- test/core/core_type_vec4.cpp | 9 +++++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/test/core/core_type_vec1.cpp b/test/core/core_type_vec1.cpp index ae08f0aa..67917844 100644 --- a/test/core/core_type_vec1.cpp +++ b/test/core/core_type_vec1.cpp @@ -29,8 +29,10 @@ /// @author Christophe Riccio /////////////////////////////////////////////////////////////////////////////////// +#if !(GLM_COMPILER & GLM_COMPILER_GCC) +# define GLM_META_PROG_HELPERS +#endif #define GLM_SWIZZLE -#define GLM_META_PROG_HELPERS #include #include #include @@ -170,7 +172,10 @@ int main() glm::vec1 v; assert(v.length() == 1); - assert(glm::vec1::components == 1); + +# ifdef GLM_META_PROG_HELPERS + assert(glm::vec1::components == 1); +# endif Error += test_vec1_size(); Error += test_vec1_ctor(); diff --git a/test/core/core_type_vec2.cpp b/test/core/core_type_vec2.cpp index cf608f9f..2b8f8575 100644 --- a/test/core/core_type_vec2.cpp +++ b/test/core/core_type_vec2.cpp @@ -29,7 +29,9 @@ /// @author Christophe Riccio /////////////////////////////////////////////////////////////////////////////////// -#define GLM_META_PROG_HELPERS +#if !(GLM_COMPILER & GLM_COMPILER_GCC) +# define GLM_META_PROG_HELPERS +#endif #define GLM_SWIZZLE #include #include @@ -329,7 +331,10 @@ int main() glm::vec2 v; assert(v.length() == 2); - assert(glm::vec2::components == 2); + +# ifdef GLM_META_PROG_HELPERS + assert(glm::vec2::components == 2); +# endif Error += test_vec2_size(); Error += test_vec2_ctor(); diff --git a/test/core/core_type_vec3.cpp b/test/core/core_type_vec3.cpp index a1a8f9f9..e2ce6ee1 100644 --- a/test/core/core_type_vec3.cpp +++ b/test/core/core_type_vec3.cpp @@ -29,7 +29,9 @@ /// @author Christophe Riccio /////////////////////////////////////////////////////////////////////////////////// -#define GLM_META_PROG_HELPERS +#if !(GLM_COMPILER & GLM_COMPILER_GCC) +# define GLM_META_PROG_HELPERS +#endif #define GLM_SWIZZLE #include #include @@ -497,7 +499,10 @@ int main() glm::vec3 v; assert(v.length() == 3); - assert(glm::vec3::components == 3); + +# ifdef GLM_META_PROG_HELPERS + assert(glm::vec3::components == 3); +# endif Error += test_vec3_ctor(); Error += test_vec3_operators(); diff --git a/test/core/core_type_vec4.cpp b/test/core/core_type_vec4.cpp index 37d6afbe..9d283a94 100644 --- a/test/core/core_type_vec4.cpp +++ b/test/core/core_type_vec4.cpp @@ -30,7 +30,9 @@ /////////////////////////////////////////////////////////////////////////////////// //#define GLM_FORCE_AVX2 -#define GLM_META_PROG_HELPERS +#if !(GLM_COMPILER & GLM_COMPILER_GCC) +# define GLM_META_PROG_HELPERS +#endif #define GLM_SWIZZLE #include #include @@ -449,7 +451,10 @@ int main() glm::vec4 v; assert(v.length() == 4); - assert(glm::vec4::components == 4); + +# ifdef GLM_META_PROG_HELPERS + assert(glm::vec4::components == 4); +# endif # ifdef NDEBUG std::size_t const Size(1000000);