mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Update gatherutils CMakeLists to use X86_INTRINSICS_FLAGS from cpu_features
This commit is contained in:
parent
91eec8962f
commit
8d0a9689e4
@ -1,5 +1,4 @@
|
|||||||
include("${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake")
|
include("${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake")
|
||||||
option(ENABLE_AVX2 "Enable AVX2 instructions (when available) when build for modern Intel CPUs" OFF)
|
|
||||||
|
|
||||||
add_headers_and_sources(clickhouse_functions_gatherutils .)
|
add_headers_and_sources(clickhouse_functions_gatherutils .)
|
||||||
add_library(clickhouse_functions_gatherutils ${clickhouse_functions_gatherutils_sources} ${clickhouse_functions_gatherutils_headers})
|
add_library(clickhouse_functions_gatherutils ${clickhouse_functions_gatherutils_sources} ${clickhouse_functions_gatherutils_headers})
|
||||||
@ -17,11 +16,4 @@ if (STRIP_DEBUG_SYMBOLS_FUNCTIONS)
|
|||||||
target_compile_options(clickhouse_functions_gatherutils PRIVATE "-g0")
|
target_compile_options(clickhouse_functions_gatherutils PRIVATE "-g0")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (HAVE_SSE42)
|
set_target_properties(clickhouse_functions_gatherutils PROPERTIES COMPILE_FLAGS "${X86_INTRINSICS_FLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2")
|
|
||||||
target_compile_options(clickhouse_functions_gatherutils PRIVATE -msse4.2)
|
|
||||||
endif()
|
|
||||||
if (HAVE_AVX2 AND ENABLE_AVX2)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx2 -DENABLE_AVX2")
|
|
||||||
target_compile_options(clickhouse_functions_gatherutils PRIVATE -mavx2)
|
|
||||||
endif()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user