From 8d0a9689e4cad21dd03e459a74b9a0a564b0db60 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Wed, 30 Mar 2022 18:40:18 +0200 Subject: [PATCH] Update gatherutils CMakeLists to use X86_INTRINSICS_FLAGS from cpu_features --- src/Functions/GatherUtils/CMakeLists.txt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Functions/GatherUtils/CMakeLists.txt b/src/Functions/GatherUtils/CMakeLists.txt index 10909b99b82..460b02326a1 100644 --- a/src/Functions/GatherUtils/CMakeLists.txt +++ b/src/Functions/GatherUtils/CMakeLists.txt @@ -1,5 +1,4 @@ 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_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") endif() -if (HAVE_SSE42) - 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() +set_target_properties(clickhouse_functions_gatherutils PROPERTIES COMPILE_FLAGS "${X86_INTRINSICS_FLAGS}")