From 356a7976db0abcdaf2a57a3abc1cb9e18ddfc1ea Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Tue, 25 Feb 2025 11:42:48 +0500 Subject: [PATCH] Fix incorrect declaration of FORCE_SSE2 Signed-off-by: Vladislav Shchapov --- CMakeLists.txt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 73ed22a4..d5e05da6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -611,13 +611,6 @@ if(MSVC) add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) endif() -if(BASEARCH_X86_FOUND) - # FORCE_SSE2 option will only be shown if HAVE_SSE2_INTRIN is true - if("${ARCH}" MATCHES "i[3-6]86") - cmake_dependent_option(FORCE_SSE2 "Always assume CPU is SSE2 capable" OFF "HAVE_SSE2_INTRIN" OFF) - endif() -endif() - # # Enable deflate_quick at level 1 # @@ -939,6 +932,10 @@ if(WITH_OPTIM) endif() if(WITH_SSE2) check_sse2_intrinsics() + # FORCE_SSE2 option will only be shown if HAVE_SSE2_INTRIN is true + if("${ARCH}" MATCHES "i[3-6]86") + cmake_dependent_option(FORCE_SSE2 "Always assume CPU is SSE2 capable" OFF "HAVE_SSE2_INTRIN" OFF) + endif() if(HAVE_SSE2_INTRIN) add_definitions(-DX86_SSE2) set(SSE2_SRCS ${ARCHDIR}/chunkset_sse2.c ${ARCHDIR}/compare256_sse2.c ${ARCHDIR}/slide_hash_sse2.c) -- 2.47.2