cmake: Detect AVX + allow build system to disable Intel intrinsics

This commit is contained in:
Anonymous Maarten
2023-02-25 00:21:15 +01:00
committed by Anonymous Maarten
parent 683411e96f
commit 4681240241
16 changed files with 175 additions and 116 deletions

View File

@@ -103,11 +103,12 @@ typedef unsigned int uintptr_t;
#define HAVE_TPCSHRD_H 1
#define HAVE_SENSORSAPI_H 1
#if (defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)) && (defined(_MSC_VER) && _MSC_VER >= 1600)
#define HAVE_IMMINTRIN_H 1
#elif defined(__has_include) && (defined(__i386__) || defined(__x86_64))
# if __has_include(<immintrin.h>)
# define HAVE_IMMINTRIN_H 1
# if !__has_include(<immintrin.h>)
# define SDL_DISABLE_AVX 1
# endif
#else
# define SDL_DISABLE_AVX 1
#endif
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */