2023-08-09 02:28:38 +08:00
|
|
|
diff --git a/cmake/cpu.cmake b/cmake/cpu.cmake
|
2024-04-19 19:39:52 +08:00
|
|
|
index 040c524..f345b89 100644
|
2023-08-09 02:28:38 +08:00
|
|
|
--- a/cmake/cpu.cmake
|
|
|
|
+++ b/cmake/cpu.cmake
|
|
|
|
@@ -50,7 +50,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;;;;") # /arch:AVX is too much for SSE4
|
|
|
|
endif()
|
|
|
|
set(SIMD_DISABLE_FLAGS)
|
|
|
|
else()
|
2024-04-19 19:39:52 +08:00
|
|
|
@@ -111,6 +111,9 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/../src/dsp/*${WEBP_SIMD_FILE_EXTENSION}")
|
2023-08-09 02:28:38 +08:00
|
|
|
if(WEBP_HAVE_${WEBP_SIMD_FLAG})
|
|
|
|
# Memorize the file and flags.
|
|
|
|
+ if("${SIMD_COMPILE_FLAG}" STREQUAL "")
|
|
|
|
+ set(SIMD_COMPILE_FLAG " ")
|
|
|
|
+ endif()
|
|
|
|
foreach(FILE ${SIMD_FILES})
|
|
|
|
list(APPEND WEBP_SIMD_FILES_TO_INCLUDE ${FILE})
|
|
|
|
list(APPEND WEBP_SIMD_FLAGS_TO_INCLUDE ${SIMD_COMPILE_FLAG})
|