Merge pull request #164 from spl/gmake-sse
Use predefined macros to enable SSE with gmake
This commit is contained in:
commit
02e5c3cf47
@ -31,10 +31,12 @@
|
||||
#define TEST_VERSION_CODE(x,y,z) \
|
||||
(((x)*100000) + ((y)*100) + (z))
|
||||
|
||||
// Only gcc >4.3 supports SSE4.2
|
||||
#if TEST_RAPIDJSON && !(defined(__GNUC__) && TEST_VERSION_CODE(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__) < TEST_VERSION_CODE(4,3,0))
|
||||
//#define RAPIDJSON_SSE2
|
||||
#define RAPIDJSON_SSE42
|
||||
// __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
|
||||
|
||||
#if TEST_YAJL
|
||||
|
Loading…
x
Reference in New Issue
Block a user