From: Vladislav Shchapov Date: Tue, 25 Feb 2025 06:42:48 +0000 (+0500) Subject: Fix incorrect declaration of FORCE_SSE2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd804414feffb7b29159c192c54c69808f8b659e;p=thirdparty%2Fzlib-ng.git Fix incorrect declaration of FORCE_SSE2 Signed-off-by: Vladislav Shchapov --- diff --git a/CMakeLists.txt b/CMakeLists.txt index aeb0ed25..35f71b0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -600,13 +600,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 # @@ -925,6 +918,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)