Enable SIMD macros in unit tests

This commit is contained in:
miloyip 2015-04-13 16:13:39 +08:00
parent affd2736c3
commit bcd879653f

View File

@ -40,6 +40,14 @@
#pragma GCC diagnostic ignored "-Weffc++"
#endif
// __SSE2__ and __SSE4_2__ are recognized by gcc, clang, and the Intel compiler.
// We use -march=native with gmake to enable -msse2 and -msse4.2, if supported.
#if defined(__SSE4_2__)
# define RAPIDJSON_SSE42
#elif defined(__SSE2__)
# define RAPIDJSON_SSE2
#endif
#include "gtest/gtest.h"
#include <stdexcept>