2019-12-24 07:19:51 +08:00
|
|
|
diff --git a/cmake/cpu.cmake b/cmake/cpu.cmake
|
2023-07-15 02:27:50 +08:00
|
|
|
index bc0dbc9..f9b7327 100644
|
2019-12-24 07:19:51 +08:00
|
|
|
--- a/cmake/cpu.cmake
|
|
|
|
+++ b/cmake/cpu.cmake
|
2023-07-15 02:27:50 +08:00
|
|
|
@@ -48,7 +48,7 @@ if(MSVC AND CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
|
|
|
if(MSVC_VERSION GREATER_EQUAL 1800 AND NOT CMAKE_C_FLAGS MATCHES "/arch:")
|
|
|
|
set(SIMD_ENABLE_FLAGS)
|
|
|
|
else()
|
|
|
|
- set(SIMD_ENABLE_FLAGS "/arch:AVX;/arch:SSE2;;;;")
|
|
|
|
+ set(SIMD_ENABLE_FLAGS "/arch:SSE2;;;;;")
|
|
|
|
endif()
|
|
|
|
set(SIMD_DISABLE_FLAGS)
|
|
|
|
else()
|
2021-09-28 08:51:56 +08:00
|
|
|
@@ -97,7 +97,7 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
|
2019-12-24 07:19:51 +08:00
|
|
|
set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG})
|
|
|
|
webp_check_compiler_flag(${WEBP_SIMD_FLAG} ${WEBP_ENABLE_SIMD})
|
|
|
|
else()
|
2021-09-28 08:51:56 +08:00
|
|
|
- if(MSVC AND SIMD_ENABLE_FLAGS)
|
2023-07-15 02:27:50 +08:00
|
|
|
+ if(MSVC AND NOT (CMAKE_GENERATOR_PLATFORM MATCHES "^ARM"))
|
2021-09-28 08:51:56 +08:00
|
|
|
# The detection for SSE2/SSE4 support under MSVC is based on the compiler
|
|
|
|
# version so e.g., clang-cl will require flags to enable the assembly.
|
2019-12-24 07:19:51 +08:00
|
|
|
list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
|