diff --git a/test/unittest/unittest.h b/test/unittest/unittest.h index 800fbab..87bb083 100644 --- a/test/unittest/unittest.h +++ b/test/unittest/unittest.h @@ -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