diff options
author | Rechi <Rechi@users.noreply.github.com> | 2017-03-22 13:31:11 +0100 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2017-03-22 13:31:11 +0100 |
commit | 68693823bdc7740d0b54192cc18275f96ed64c89 (patch) | |
tree | e862cab2c350b1271b1244742e62850e04aad163 | |
parent | e6d68f421a62b400499fef2b62bb6020c193c052 (diff) |
[cmake] Fix compiling of Android-X86 after 742cc3c31b by checking SSE support again
-rw-r--r-- | cmake/modules/FindSSE.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cmake/modules/FindSSE.cmake b/cmake/modules/FindSSE.cmake index ba9fb541ed..d001b03376 100644 --- a/cmake/modules/FindSSE.cmake +++ b/cmake/modules/FindSSE.cmake @@ -40,6 +40,22 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") string(COMPARE EQUAL "avx2" "${_SSE_THERE}" _AVX2_TRUE) CHECK_CXX_ACCEPTS_FLAG("-mavx2" _AVX2_OK) endif() +elseif(CMAKE_SYSTEM_NAME MATCHES "Android") + if(CPU MATCHES "x86_64" OR CPU MATCHES "i.86") + set(_SSE_TRUE TRUE) + set(_SSE2_TRUE TRUE) + set(_SSE3_TRUE TRUE) + set(_SSSE3_TRUE TRUE) + + CHECK_CXX_ACCEPTS_FLAG("-msse" _SSE_OK) + CHECK_CXX_ACCEPTS_FLAG("-msse2" _SSE2_OK) + CHECK_CXX_ACCEPTS_FLAG("-msse3" _SSE3_OK) + CHECK_CXX_ACCEPTS_FLAG("-mssse3" _SSSE3_OK) + CHECK_CXX_ACCEPTS_FLAG("-msse4.1" _SSE41_OK) + CHECK_CXX_ACCEPTS_FLAG("-msse4.2" _SSE42_OK) + CHECK_CXX_ACCEPTS_FLAG("-mavx" _AVX_OK) + CHECK_CXX_ACCEPTS_FLAG("-mavx2" _AVX2_OK) + endif() elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") if(NOT CPU MATCHES "arm") exec_program("/usr/sbin/sysctl -n machdep.cpu.features machdep.cpu.leaf7_features" OUTPUT_VARIABLE CPUINFO) |