]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
CMake: don't assume i[3456]86 if others don't match
authorDaniel Black <daniel@linux.ibm.com>
Wed, 2 May 2018 23:31:35 +0000 (09:31 +1000)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sun, 20 May 2018 12:53:02 +0000 (14:53 +0200)
Match these architectures explicitly and fall back to generic.

CMakeLists.txt

index 41faf57454530d3641bbfb21c6889a56a17a8633..d19b26af5e48ab6abf913877ac0142382b3ef8fd 100644 (file)
@@ -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)