From 6e239012279a22461014d508c5c8dffeaac2e3e9 Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Wed, 30 Sep 2020 23:23:01 +0800 Subject: [PATCH] enable FastMemcpy properly --- CMakeLists.txt | 6 ++++++ base/glibc-compatibility/CMakeLists.txt | 2 -- contrib/FastMemcpy/CMakeLists.txt | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4e230fbd93..0969d49d9a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -369,6 +369,12 @@ endif () include(cmake/dbms_glob_sources.cmake) +if (${ENABLE_LIBRARIES} OR ${GLIBC_COMPATIBILITY}) + option (ENABLE_FASTMEMCPY "Enable FastMemcpy library (only internal)" ON) +else () + option (ENABLE_FASTMEMCPY "Enable FastMemcpy library (only internal)" OFF) +endif () + if (OS_LINUX OR OS_ANDROID) include(cmake/linux/default_libs.cmake) elseif (OS_DARWIN) diff --git a/base/glibc-compatibility/CMakeLists.txt b/base/glibc-compatibility/CMakeLists.txt index 2bd4e20d3bc..1a76ef3df32 100644 --- a/base/glibc-compatibility/CMakeLists.txt +++ b/base/glibc-compatibility/CMakeLists.txt @@ -1,6 +1,4 @@ if (GLIBC_COMPATIBILITY) - set (ENABLE_FASTMEMCPY ON) - enable_language(ASM) include(CheckIncludeFile) diff --git a/contrib/FastMemcpy/CMakeLists.txt b/contrib/FastMemcpy/CMakeLists.txt index 8efe6d45dff..0f3072b4e05 100644 --- a/contrib/FastMemcpy/CMakeLists.txt +++ b/contrib/FastMemcpy/CMakeLists.txt @@ -1,5 +1,3 @@ -option (ENABLE_FASTMEMCPY "Enable FastMemcpy library (only internal)" ${ENABLE_LIBRARIES}) - if (NOT OS_LINUX OR ARCH_AARCH64) set (ENABLE_FASTMEMCPY OFF) endif ()