Fixed GCC build, GLM_META_PROG_HELPERS unsupported with GCC 4.6

This commit is contained in:
Christophe Riccio 2015-07-19 01:46:49 +02:00
parent 02d7be8531
commit 4f7afb272f
4 changed files with 28 additions and 8 deletions

View File

@ -29,8 +29,10 @@
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
#define GLM_SWIZZLE
#if !(GLM_COMPILER & GLM_COMPILER_GCC)
# define GLM_META_PROG_HELPERS
#endif
#define GLM_SWIZZLE
#include <glm/vector_relational.hpp>
#include <glm/gtc/vec1.hpp>
#include <vector>
@ -170,7 +172,10 @@ int main()
glm::vec1 v;
assert(v.length() == 1);
# ifdef GLM_META_PROG_HELPERS
assert(glm::vec1::components == 1);
# endif
Error += test_vec1_size();
Error += test_vec1_ctor();

View File

@ -29,7 +29,9 @@
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
#if !(GLM_COMPILER & GLM_COMPILER_GCC)
# define GLM_META_PROG_HELPERS
#endif
#define GLM_SWIZZLE
#include <glm/vector_relational.hpp>
#include <glm/vec2.hpp>
@ -329,7 +331,10 @@ int main()
glm::vec2 v;
assert(v.length() == 2);
# ifdef GLM_META_PROG_HELPERS
assert(glm::vec2::components == 2);
# endif
Error += test_vec2_size();
Error += test_vec2_ctor();

View File

@ -29,7 +29,9 @@
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
#if !(GLM_COMPILER & GLM_COMPILER_GCC)
# define GLM_META_PROG_HELPERS
#endif
#define GLM_SWIZZLE
#include <glm/vector_relational.hpp>
#include <glm/geometric.hpp>
@ -497,7 +499,10 @@ int main()
glm::vec3 v;
assert(v.length() == 3);
# ifdef GLM_META_PROG_HELPERS
assert(glm::vec3::components == 3);
# endif
Error += test_vec3_ctor();
Error += test_vec3_operators();

View File

@ -30,7 +30,9 @@
///////////////////////////////////////////////////////////////////////////////////
//#define GLM_FORCE_AVX2
#if !(GLM_COMPILER & GLM_COMPILER_GCC)
# define GLM_META_PROG_HELPERS
#endif
#define GLM_SWIZZLE
#include <glm/vector_relational.hpp>
#include <glm/vec2.hpp>
@ -449,7 +451,10 @@ int main()
glm::vec4 v;
assert(v.length() == 4);
# ifdef GLM_META_PROG_HELPERS
assert(glm::vec4::components == 4);
# endif
# ifdef NDEBUG
std::size_t const Size(1000000);