Skip to content

Commit

Permalink
Do not enable SSE feature for ARM64 by default
Browse files Browse the repository at this point in the history
SSE is not available on ARM64. In order to enable win-arm64 widely,
regardless of 3rd party projects' build systems, the most clean
solution is simply not enable this flag by default on ARM64.
Tested with Pillow python package.
  • Loading branch information
gaborkertesz-linaro committed Nov 3, 2021
1 parent b9ede5e commit 94adecb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ file(READ version.txt VERSION)

project(imagequant C)

option(BUILD_WITH_SSE "Use SSE" ON)
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL ARM64)
option(BUILD_WITH_SSE "Use SSE" OFF)
else()
option(BUILD_WITH_SSE "Use SSE" ON)
endif()

if(BUILD_WITH_SSE)
add_definitions(-DUSE_SSE=1)
Expand Down

0 comments on commit 94adecb

Please sign in to comment.