diff --git a/cmake/find_mimalloc.cmake b/cmake/find_mimalloc.cmake index 9ee785e0753..45ebf90a204 100644 --- a/cmake/find_mimalloc.cmake +++ b/cmake/find_mimalloc.cmake @@ -3,7 +3,8 @@ if (OS_LINUX AND NOT SANITIZE AND NOT ARCH_ARM AND NOT ARCH_32 AND NOT ARCH_PPC6 endif () if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/mimalloc/include/mimalloc.h") - message (WARNING "submodule contrib/mimalloc is missing. to fix try run: \n git submodule update --init --recursive") + message (WARNING "submodule contrib/mimalloc is missing. to fix try run: \n git submodule update --init --recursive") + return () endif () if (ENABLE_MIMALLOC) diff --git a/libs/libcommon/cmake/find_jemalloc.cmake b/libs/libcommon/cmake/find_jemalloc.cmake index 3a1b14d9c33..0b1c80c8934 100644 --- a/libs/libcommon/cmake/find_jemalloc.cmake +++ b/libs/libcommon/cmake/find_jemalloc.cmake @@ -7,7 +7,7 @@ endif () option (ENABLE_JEMALLOC "Set to TRUE to use jemalloc" ${ENABLE_JEMALLOC_DEFAULT}) if (OS_LINUX AND NOT ARCH_ARM) option (USE_INTERNAL_JEMALLOC_LIBRARY "Set to FALSE to use system jemalloc library instead of bundled" ${NOT_UNBUNDLED}) -elseif () +else() option (USE_INTERNAL_JEMALLOC_LIBRARY "Set to FALSE to use system jemalloc library instead of bundled" OFF) endif() @@ -30,7 +30,7 @@ if (ENABLE_JEMALLOC) if (JEMALLOC_LIBRARIES) set (USE_JEMALLOC 1) - else () + elseif (NOT MISSING_INTERNAL_JEMALLOC_LIBRARY) message (FATAL_ERROR "ENABLE_JEMALLOC is set to true, but library was not found") endif ()