From 18fd3e7357c3e20b2b2f337889004efa4449b1b5 Mon Sep 17 00:00:00 2001 From: Konstantin Podshumok Date: Sat, 15 Aug 2020 02:22:46 +0300 Subject: [PATCH] cmake: ARM: make sure cpuid is not enabled by default Signed-off-by: Konstantin Podshumok --- contrib/libcpuid-cmake/CMakeLists.txt | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/contrib/libcpuid-cmake/CMakeLists.txt b/contrib/libcpuid-cmake/CMakeLists.txt index 564e67994bf..8c1be50b4e6 100644 --- a/contrib/libcpuid-cmake/CMakeLists.txt +++ b/contrib/libcpuid-cmake/CMakeLists.txt @@ -1,4 +1,6 @@ -option (ENABLE_CPUID "Enable libcpuid library (only internal)" ${ENABLE_LIBRARIES}) +if (NOT ARCH_ARM) + option (ENABLE_CPUID "Enable libcpuid library (only internal)" ${ENABLE_LIBRARIES}) +endif() if (ARCH_ARM AND ENABLE_CPUID) message (${RECONFIGURE_MESSAGE_LEVEL} "cpuid is not supported on ARM") @@ -16,19 +18,19 @@ endif() set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/libcpuid") set (SRCS - ${LIBRARY_DIR}/libcpuid/asm-bits.c - ${LIBRARY_DIR}/libcpuid/cpuid_main.c - ${LIBRARY_DIR}/libcpuid/libcpuid_util.c - ${LIBRARY_DIR}/libcpuid/msrdriver.c - ${LIBRARY_DIR}/libcpuid/rdmsr.c - ${LIBRARY_DIR}/libcpuid/rdtsc.c - ${LIBRARY_DIR}/libcpuid/recog_amd.c - ${LIBRARY_DIR}/libcpuid/recog_intel.c + "${LIBRARY_DIR}/libcpuid/asm-bits.c" + "${LIBRARY_DIR}/libcpuid/cpuid_main.c" + "${LIBRARY_DIR}/libcpuid/libcpuid_util.c" + "${LIBRARY_DIR}/libcpuid/msrdriver.c" + "${LIBRARY_DIR}/libcpuid/rdmsr.c" + "${LIBRARY_DIR}/libcpuid/rdtsc.c" + "${LIBRARY_DIR}/libcpuid/recog_amd.c" + "${LIBRARY_DIR}/libcpuid/recog_intel.c" ) add_library (cpuid ${SRCS}) -target_include_directories (cpuid SYSTEM PUBLIC ${LIBRARY_DIR}) +target_include_directories (cpuid SYSTEM PUBLIC "${LIBRARY_DIR}") target_compile_definitions (cpuid PUBLIC USE_CPUID=1) target_compile_definitions (cpuid PRIVATE VERSION="v0.4.1") if (COMPILER_CLANG)