mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
Fix build
This commit is contained in:
parent
89a7f90579
commit
3c9d9ce39e
@ -7,53 +7,60 @@ endif()
|
|||||||
|
|
||||||
SET(LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/aklomp-base64")
|
SET(LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/aklomp-base64")
|
||||||
|
|
||||||
# These defines enable/disable SIMD codecs in base64's runtime codec dispatch.
|
if (ARCH_AMD64)
|
||||||
# We don't want to limit ourselves --> enable all.
|
# These defines enable/disable SIMD codecs in base64's runtime codec dispatch.
|
||||||
set(HAVE_SSSE3 1)
|
# We don't want to limit ourselves --> enable all.
|
||||||
set(HAVE_SSE41 1)
|
set(HAVE_SSSE3 1)
|
||||||
set(HAVE_SSE42 1)
|
set(HAVE_SSE41 1)
|
||||||
set(HAVE_AVX 1)
|
set(HAVE_SSE42 1)
|
||||||
set(HAVE_AVX2 1)
|
set(HAVE_AVX 1)
|
||||||
set(HAVE_AVX512 1)
|
set(HAVE_AVX2 1)
|
||||||
# (no runtime dispatch on ARM)
|
set(HAVE_AVX512 1)
|
||||||
if (NOT NO_ARMV81_OR_HIGHER)
|
endif ()
|
||||||
set(HAVE_NEON64 1)
|
|
||||||
set(HAVE_NEON32 0)
|
if (ARCH_AARCH64)
|
||||||
|
# The choice of HAVE_NEON* depends on the target machine because base64 provides
|
||||||
|
# no runtime dispatch on ARM. NEON is only mandatory with the normal build profile.
|
||||||
|
if(NOT NO_ARMV81_OR_HIGHER)
|
||||||
|
set(HAVE_NEON64 1)
|
||||||
|
set(HAVE_NEON32 0)
|
||||||
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||||
|
|
||||||
add_library(_base64
|
add_library(_base64
|
||||||
# Library files
|
"${LIBRARY_DIR}/lib/lib.c"
|
||||||
"${LIBRARY_DIR}/lib/lib.c"
|
"${LIBRARY_DIR}/lib/codec_choose.c"
|
||||||
"${LIBRARY_DIR}/lib/codec_choose.c"
|
|
||||||
|
|
||||||
"${LIBRARY_DIR}/lib/tables/tables.c"
|
"${LIBRARY_DIR}/lib/tables/tables.c"
|
||||||
|
"${LIBRARY_DIR}/lib/tables/table_dec_32bit.h"
|
||||||
|
"${LIBRARY_DIR}/lib/tables/table_enc_12bit.h"
|
||||||
|
|
||||||
# Codec implementations
|
"${LIBRARY_DIR}/lib/codecs.h"
|
||||||
"${LIBRARY_DIR}/lib/arch/generic/codec.c"
|
|
||||||
"${LIBRARY_DIR}/lib/arch/ssse3/codec.c"
|
|
||||||
"${LIBRARY_DIR}/lib/arch/sse41/codec.c"
|
|
||||||
"${LIBRARY_DIR}/lib/arch/sse42/codec.c"
|
|
||||||
"${LIBRARY_DIR}/lib/arch/avx/codec.c"
|
|
||||||
"${LIBRARY_DIR}/lib/arch/avx2/codec.c"
|
|
||||||
"${LIBRARY_DIR}/lib/arch/avx512/codec.c"
|
|
||||||
"${LIBRARY_DIR}/lib/arch/neon32/codec.c"
|
|
||||||
"${LIBRARY_DIR}/lib/arch/neon64/codec.c"
|
|
||||||
|
|
||||||
# Tables
|
"${CMAKE_CURRENT_BINARY_DIR}/config.h"
|
||||||
"${LIBRARY_DIR}/lib/tables/table_dec_32bit.h"
|
|
||||||
"${LIBRARY_DIR}/lib/tables/table_enc_12bit.h"
|
|
||||||
|
|
||||||
"${LIBRARY_DIR}/lib/codecs.h"
|
"${LIBRARY_DIR}/lib/arch/generic/codec.c"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/config.h")
|
"${LIBRARY_DIR}/lib/arch/ssse3/codec.c"
|
||||||
|
"${LIBRARY_DIR}/lib/arch/sse41/codec.c"
|
||||||
|
"${LIBRARY_DIR}/lib/arch/sse42/codec.c"
|
||||||
|
"${LIBRARY_DIR}/lib/arch/avx/codec.c"
|
||||||
|
"${LIBRARY_DIR}/lib/arch/avx2/codec.c"
|
||||||
|
"${LIBRARY_DIR}/lib/arch/avx512/codec.c"
|
||||||
|
|
||||||
set_source_files_properties(${LIBRARY_DIR}/lib/arch/ssse3/codec.c PROPERTIES COMPILE_FLAGS "-mssse3")
|
"${LIBRARY_DIR}/lib/arch/neon32/codec.c"
|
||||||
set_source_files_properties(${LIBRARY_DIR}/lib/arch/sse41/codec.c PROPERTIES COMPILE_FLAGS "-msse4.1")
|
"${LIBRARY_DIR}/lib/arch/neon64/codec.c"
|
||||||
set_source_files_properties(${LIBRARY_DIR}/lib/arch/sse42/codec.c PROPERTIES COMPILE_FLAGS "-msse4.2")
|
)
|
||||||
set_source_files_properties(${LIBRARY_DIR}/lib/arch/avx/codec.c PROPERTIES COMPILE_FLAGS "-mavx")
|
|
||||||
set_source_files_properties(${LIBRARY_DIR}/lib/arch/avx2/codec.c PROPERTIES COMPILE_FLAGS "-mavx2")
|
if (ARCH_AMD64)
|
||||||
set_source_files_properties(${LIBRARY_DIR}/lib/arch/avx512/codec.c PROPERTIES COMPILE_FLAGS "-mavx512vl -mavx512vbmi")
|
set_source_files_properties(${LIBRARY_DIR}/lib/arch/ssse3/codec.c PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||||
|
set_source_files_properties(${LIBRARY_DIR}/lib/arch/sse41/codec.c PROPERTIES COMPILE_FLAGS "-msse4.1")
|
||||||
|
set_source_files_properties(${LIBRARY_DIR}/lib/arch/sse42/codec.c PROPERTIES COMPILE_FLAGS "-msse4.2")
|
||||||
|
set_source_files_properties(${LIBRARY_DIR}/lib/arch/avx/codec.c PROPERTIES COMPILE_FLAGS "-mavx")
|
||||||
|
set_source_files_properties(${LIBRARY_DIR}/lib/arch/avx2/codec.c PROPERTIES COMPILE_FLAGS "-mavx2")
|
||||||
|
set_source_files_properties(${LIBRARY_DIR}/lib/arch/avx512/codec.c PROPERTIES COMPILE_FLAGS "-mavx512vl -mavx512vbmi")
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(_base64 SYSTEM PUBLIC ${LIBRARY_DIR}/include)
|
target_include_directories(_base64 SYSTEM PUBLIC ${LIBRARY_DIR}/include)
|
||||||
target_include_directories(_base64 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
target_include_directories(_base64 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
Loading…
Reference in New Issue
Block a user