mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
libs/ → base/
This commit is contained in:
parent
e43fe35a69
commit
2d44fa59b5
@ -364,9 +364,9 @@ if (ENABLE_TESTS)
|
||||
endif ()
|
||||
|
||||
# Need to process before "contrib" dir:
|
||||
include (libs/libcommon/cmake/find_jemalloc.cmake)
|
||||
include (libs/libcommon/cmake/find_cctz.cmake)
|
||||
include (libs/libmysqlxx/cmake/find_mysqlclient.cmake)
|
||||
include (cmake/find/jemalloc.cmake)
|
||||
include (cmake/find/cctz.cmake)
|
||||
include (cmake/find/mysqlclient.cmake)
|
||||
|
||||
# When testing for memory leaks with Valgrind, don't link tcmalloc or jemalloc.
|
||||
|
||||
@ -398,7 +398,7 @@ macro (add_executable target)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
add_subdirectory (libs)
|
||||
add_subdirectory (base)
|
||||
add_subdirectory (utils)
|
||||
add_subdirectory (dbms)
|
||||
|
||||
|
@ -4,23 +4,23 @@ if (NOT NO_WERROR)
|
||||
endif ()
|
||||
|
||||
if (USE_DEBUG_HELPERS)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/libcommon/include/common/iostream_debug_helpers.h")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/common/iostream_debug_helpers.h")
|
||||
endif ()
|
||||
|
||||
add_subdirectory (libcommon)
|
||||
add_subdirectory (libloggers)
|
||||
add_subdirectory (libdaemon)
|
||||
add_subdirectory (common)
|
||||
add_subdirectory (loggers)
|
||||
add_subdirectory (daemon)
|
||||
|
||||
if (USE_INTERNAL_MEMCPY)
|
||||
add_subdirectory (libmemcpy)
|
||||
add_subdirectory (memcpy)
|
||||
endif()
|
||||
|
||||
if (USE_MYSQL)
|
||||
add_subdirectory (libmysqlxx)
|
||||
add_subdirectory (mysqlxx)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_CONSISTENT_HASHING_LIBRARY)
|
||||
add_subdirectory (consistent-hashing)
|
||||
endif ()
|
||||
add_subdirectory (consistent-hashing-sumbur)
|
||||
add_subdirectory (libwidechar_width)
|
||||
add_subdirectory (widechar_width)
|
85
base/common/CMakeLists.txt
Normal file
85
base/common/CMakeLists.txt
Normal file
@ -0,0 +1,85 @@
|
||||
set (CONFIG_COMMON ${CMAKE_CURRENT_BINARY_DIR}/config_common.h)
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config_common.h.in ${CONFIG_COMMON})
|
||||
|
||||
add_library(apple_rt apple_rt.cpp)
|
||||
target_include_directories (apple_rt PUBLIC ${COMMON_INCLUDE_DIR})
|
||||
if (DEFINED APPLE_HAVE_CLOCK_GETTIME)
|
||||
target_compile_definitions(apple_rt PUBLIC -DAPPLE_HAVE_CLOCK_GETTIME=${APPLE_HAVE_CLOCK_GETTIME})
|
||||
endif ()
|
||||
|
||||
set (COMMON_SRCS
|
||||
argsToConfig.cpp
|
||||
coverage.cpp
|
||||
DateLUT.cpp
|
||||
DateLUTImpl.cpp
|
||||
demangle.cpp
|
||||
getMemoryAmount.cpp
|
||||
getThreadId.cpp
|
||||
JSON.cpp
|
||||
LineReader.cpp
|
||||
mremap.cpp
|
||||
phdr_cache.cpp
|
||||
preciseExp10.c
|
||||
setTerminalEcho.cpp
|
||||
shift10.cpp
|
||||
sleep.cpp
|
||||
)
|
||||
|
||||
if (ENABLE_REPLXX)
|
||||
set (COMMON_SRCS
|
||||
ReplxxLineReader.cpp
|
||||
ReplxxLineReader.h
|
||||
|
||||
${COMMON_SRCS}
|
||||
)
|
||||
endif ()
|
||||
|
||||
add_library (common
|
||||
${COMMON_SRCS}
|
||||
${CONFIG_COMMON})
|
||||
|
||||
if (USE_INTERNAL_MEMCPY)
|
||||
set (MEMCPY_LIBRARIES memcpy)
|
||||
endif ()
|
||||
|
||||
find_package (Threads)
|
||||
|
||||
if(CCTZ_INCLUDE_DIR)
|
||||
target_include_directories(common BEFORE PRIVATE ${CCTZ_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
target_include_directories (common PUBLIC ${COMMON_INCLUDE_DIR})
|
||||
|
||||
if (NOT USE_INTERNAL_BOOST_LIBRARY)
|
||||
target_include_directories (common SYSTEM BEFORE PUBLIC ${Boost_INCLUDE_DIRS})
|
||||
endif ()
|
||||
|
||||
if(NOT USE_INTERNAL_POCO_LIBRARY)
|
||||
target_include_directories (common SYSTEM BEFORE PUBLIC ${Poco_Foundation_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(CCTZ_LIBRARY)
|
||||
target_link_libraries(common PRIVATE ${CCTZ_LIBRARY})
|
||||
endif()
|
||||
|
||||
if (ENABLE_REPLXX)
|
||||
target_link_libraries(common PUBLIC replxx)
|
||||
endif ()
|
||||
|
||||
target_link_libraries (common
|
||||
PUBLIC
|
||||
${Poco_Util_LIBRARY}
|
||||
${Poco_Foundation_LIBRARY}
|
||||
${CITYHASH_LIBRARIES}
|
||||
PUBLIC
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
PRIVATE
|
||||
${MEMCPY_LIBRARIES})
|
||||
|
||||
if (RT_LIBRARY)
|
||||
target_link_libraries (common PRIVATE ${RT_LIBRARY})
|
||||
endif ()
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory (tests)
|
||||
endif ()
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user