summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2019-09-18 13:13:15 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2019-09-18 22:13:15 +0200
commitf71e33d4e2f2ab30a3eb634fcc7ac1e2953e7368 (patch)
treea20b0f189a32a2baaebdc524efa480aabd0acc93
parent6e4b0e087a01bc8cfcd5852bc4af535bd57750f4 (diff)
downloadProject-Tick-f71e33d4e2f2ab30a3eb634fcc7ac1e2953e7368.tar.gz
Project-Tick-f71e33d4e2f2ab30a3eb634fcc7ac1e2953e7368.zip
Simplify adding src files with list() command. (#405)
-rw-r--r--CMakeLists.txt23
1 files changed, 11 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2904121cb3..03f508864b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -550,12 +550,12 @@ 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}/armfeature.c ${ARCHDIR}/fill_window_arm.c)
+ list(APPEND ZLIB_ARCH_SRCS ${ARCHDIR}/armfeature.c ${ARCHDIR}/fill_window_arm.c)
endif()
if(WITH_OPTIM)
if("${ARCH}" MATCHES "arm" OR "${ARCH}" MATCHES "aarch64")
if(WITH_NEON)
- set(ZLIB_ARCH_SRCS ${ZLIB_ARCH_SRCS} ${ARCHDIR}/adler32_neon.c)
+ list(APPEND ZLIB_ARCH_SRCS ${ARCHDIR}/adler32_neon.c)
add_definitions(-DARM_NEON_ADLER32)
add_intrinsics_option("${NEONFLAG}")
if(MSVC)
@@ -564,7 +564,7 @@ if(WITH_OPTIM)
add_feature_info(NEON_FILLWINDOW 1 "Support NEON instructions in fill_window_arm, using \"${NEONFLAG}\"")
endif()
if(WITH_ACLE)
- set(ZLIB_ARCH_SRCS ${ZLIB_ARCH_SRCS} ${ARCHDIR}/crc32_acle.c ${ARCHDIR}/insert_string_acle.c)
+ list(APPEND ZLIB_ARCH_SRCS ${ARCHDIR}/crc32_acle.c ${ARCHDIR}/insert_string_acle.c)
add_definitions(-DARM_ACLE_CRC_HASH)
# For ARM aarch64, we need to check WITH_NEON first
if("${ARCH}" MATCHES "arm" OR NOT WITH_NEON)
@@ -574,10 +574,10 @@ if(WITH_OPTIM)
endif()
elseif("${ARCHDIR}" MATCHES "arch/x86")
add_definitions("-DX86_CPUID")
- set(ZLIB_ARCH_SRCS ${ZLIB_ARCH_SRCS} ${ARCHDIR}/x86.c)
+ list(APPEND ZLIB_ARCH_SRCS ${ARCHDIR}/x86.c)
if(HAVE_SSE42CRC_INLINE_ASM OR HAVE_SSE42CRC_INTRIN)
add_definitions(-DX86_SSE42_CRC_HASH)
- set(ZLIB_ARCH_SRCS ${ZLIB_ARCH_SRCS} ${ARCHDIR}/insert_string_sse.c)
+ list(APPEND ZLIB_ARCH_SRCS ${ARCHDIR}/insert_string_sse.c)
add_feature_info(SSE42_CRC 1 "Support CRC hash generation using the SSE4.2 instruction set, using \"${SSE4FLAG}\"")
add_intrinsics_option("${SSE4FLAG}")
if(HAVE_SSE42CRC_INTRIN)
@@ -585,14 +585,13 @@ if(WITH_OPTIM)
endif()
if(WITH_NEW_STRATEGIES)
add_definitions(-DX86_QUICK_STRATEGY)
- set(ZLIB_ARCH_SRCS ${ZLIB_ARCH_SRCS} ${ARCHDIR}/deflate_quick.c)
+ list(APPEND ZLIB_ARCH_SRCS ${ARCHDIR}/deflate_quick.c)
add_feature_info(SSE42_DEFLATE_QUICK 1 "Support SSE4.2-accelerated quick compression")
endif()
endif()
if(HAVE_SSE2_INTRIN)
add_definitions(-DX86_SSE2)
- set(ZLIB_ARCH_SRCS ${ZLIB_ARCH_SRCS} ${ARCHDIR}/fill_window_sse.c)
- set(ZLIB_ARCH_SRCS ${ZLIB_ARCH_SRCS} ${ARCHDIR}/slide_sse.c)
+ list(APPEND ZLIB_ARCH_SRCS ${ARCHDIR}/fill_window_sse.c ${ARCHDIR}/slide_sse.c)
if(NOT ${ARCH} MATCHES "x86_64")
add_intrinsics_option("${SSE2FLAG}")
add_feature_info(FORCE_SSE2 FORCE_SSE2 "Assume CPU is SSE2 capable")
@@ -603,7 +602,7 @@ if(WITH_OPTIM)
endif()
if(HAVE_PCLMULQDQ_INTRIN)
add_definitions(-DX86_PCLMULQDQ_CRC)
- set(ZLIB_ARCH_SRCS ${ZLIB_ARCH_SRCS} ${ARCHDIR}/crc_folding.c)
+ list(APPEND ZLIB_ARCH_SRCS ${ARCHDIR}/crc_folding.c)
add_intrinsics_option("${PCLMULFLAG}")
if(HAVE_SSE42CRC_INLINE_ASM)
add_feature_info(PCLMUL_CRC 1 "Support CRC hash generation using PCLMULQDQ, using \"${PCLMULFLAG}\"")
@@ -613,15 +612,15 @@ if(WITH_OPTIM)
endif()
elseif("${ARCH}" MATCHES "s390x")
if(WITH_DFLTCC_DEFLATE OR WITH_DFLTCC_INFLATE)
- set(ZLIB_ARCH_SRCS ${ZLIB_ARCH_SRCS} ${ARCHDIR}/dfltcc_common.c)
+ list(APPEND ZLIB_ARCH_SRCS ${ARCHDIR}/dfltcc_common.c)
endif()
if(WITH_DFLTCC_DEFLATE)
add_definitions(-DS390_DFLTCC_DEFLATE)
- set(ZLIB_ARCH_SRCS ${ZLIB_ARCH_SRCS} ${ARCHDIR}/dfltcc_deflate.c)
+ list(APPEND ZLIB_ARCH_SRCS ${ARCHDIR}/dfltcc_deflate.c)
endif()
if(WITH_DFLTCC_INFLATE)
add_definitions(-DS390_DFLTCC_INFLATE)
- set(ZLIB_ARCH_SRCS ${ZLIB_ARCH_SRCS} ${ARCHDIR}/dfltcc_inflate.c)
+ list(APPEND ZLIB_ARCH_SRCS ${ARCHDIR}/dfltcc_inflate.c)
endif()
endif()
endif()