From: Daniel Black Date: Wed, 2 May 2018 23:31:35 +0000 (+1000) Subject: CMake: don't assume i[3456]86 if others don't match X-Git-Tag: 1.9.9-b1~631 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68acde858f441a5bb2f88e909e146e1faac50712;p=thirdparty%2Fzlib-ng.git CMake: don't assume i[3456]86 if others don't match Match these architectures explicitly and fall back to generic. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 41faf5745..d19b26af5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -381,10 +381,12 @@ elseif("${ARCH}" MATCHES "arm") elseif("${ARCH}" MATCHES "aarch64") set(ARCHDIR "arch/aarch64") add_definitions(-DUNALIGNED_OK -DUNROLL_LESS) -else() +elseif("${ARCH}" MATCHES "i[3-6]86") set(ARCHDIR "arch/x86") add_definitions(-DX86 -DUNALIGNED_OK -DUNROLL_LESS) add_feature_info(SSE2 1 "Support the SSE2 instruction set, using \"${SSE2FLAG}\"") +else() + message(STATUS "No optimized architecture: using ${ARCHDIR}") endif() if("${ARCH}" MATCHES "arm" OR "${ARCH}" MATCHES "aarch64") set(ZLIB_ARCH_SRCS ${ZLIB_ARCH_SRCS} ${ARCHDIR}/fill_window_arm.c)