2017-03-14 13:47:39 +00:00
|
|
|
set (CONFIG_COMMON ${CMAKE_CURRENT_BINARY_DIR}/include/common/config_common.h)
|
2017-01-25 22:24:36 +00:00
|
|
|
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/include/common/config_common.h.in ${CONFIG_COMMON})
|
2017-01-18 23:28:23 +00:00
|
|
|
|
2019-04-24 09:06:28 +00:00
|
|
|
add_library(apple_rt
|
2018-06-19 18:09:09 +00:00
|
|
|
src/apple_rt.cpp
|
|
|
|
include/port/clock.h
|
|
|
|
)
|
|
|
|
target_include_directories (apple_rt PUBLIC ${COMMON_INCLUDE_DIR})
|
2018-07-20 16:56:39 +00:00
|
|
|
if (DEFINED APPLE_HAVE_CLOCK_GETTIME)
|
|
|
|
target_compile_definitions(apple_rt PUBLIC -DAPPLE_HAVE_CLOCK_GETTIME=${APPLE_HAVE_CLOCK_GETTIME})
|
|
|
|
endif ()
|
2016-10-26 22:27:38 +00:00
|
|
|
|
2019-05-12 16:16:30 +00:00
|
|
|
add_library (common
|
2019-12-26 15:30:25 +00:00
|
|
|
src/argsToConfig.cpp
|
|
|
|
src/coverage.cpp
|
2017-04-01 07:20:54 +00:00
|
|
|
src/DateLUT.cpp
|
|
|
|
src/DateLUTImpl.cpp
|
2018-04-09 13:52:39 +00:00
|
|
|
src/demangle.cpp
|
2019-12-26 15:30:25 +00:00
|
|
|
src/getMemoryAmount.cpp
|
2019-04-17 14:53:54 +00:00
|
|
|
src/getThreadNumber.cpp
|
2019-12-26 15:30:25 +00:00
|
|
|
src/JSON.cpp
|
|
|
|
src/LineReader.cpp
|
|
|
|
src/mremap.cpp
|
2019-07-24 15:26:23 +00:00
|
|
|
src/phdr_cache.cpp
|
2019-12-26 15:30:25 +00:00
|
|
|
src/preciseExp10.c
|
|
|
|
src/setTerminalEcho.cpp
|
|
|
|
src/shift10.cpp
|
|
|
|
src/sleep.cpp
|
2016-02-07 21:58:58 +00:00
|
|
|
|
2019-12-26 15:30:25 +00:00
|
|
|
include/common/constexpr_helpers.h
|
|
|
|
include/common/coverage.h
|
2017-04-01 07:20:54 +00:00
|
|
|
include/common/DateLUT.h
|
|
|
|
include/common/DateLUTImpl.h
|
2019-12-26 15:30:25 +00:00
|
|
|
include/common/DayNum.h
|
|
|
|
include/common/demangle.h
|
2017-04-01 07:20:54 +00:00
|
|
|
include/common/ErrorHandlers.h
|
2019-12-26 15:30:25 +00:00
|
|
|
include/common/find_symbols.h
|
|
|
|
include/common/getMemoryAmount.h
|
|
|
|
include/common/getThreadNumber.h
|
|
|
|
include/common/JSON.h
|
2017-04-01 07:20:54 +00:00
|
|
|
include/common/likely.h
|
2019-12-26 15:30:25 +00:00
|
|
|
include/common/LineReader.h
|
|
|
|
include/common/LocalDate.h
|
|
|
|
include/common/LocalDateTime.h
|
2017-04-01 07:20:54 +00:00
|
|
|
include/common/logger_useful.h
|
2019-12-26 15:30:25 +00:00
|
|
|
include/common/mremap.h
|
|
|
|
include/common/phdr_cache.h
|
|
|
|
include/common/preciseExp10.h
|
2019-02-02 00:25:12 +00:00
|
|
|
include/common/setTerminalEcho.h
|
2019-12-26 15:30:25 +00:00
|
|
|
include/common/shift10.h
|
2019-05-30 10:30:24 +00:00
|
|
|
include/common/SimpleCache.h
|
2019-12-26 15:30:25 +00:00
|
|
|
include/common/SimpleCache.h
|
|
|
|
include/common/sleep.h
|
|
|
|
include/common/strong_typedef.h
|
|
|
|
include/common/Types.h
|
2016-02-07 21:58:58 +00:00
|
|
|
|
2017-06-07 01:48:22 +00:00
|
|
|
include/ext/bit_cast.h
|
2019-11-09 19:14:51 +00:00
|
|
|
include/ext/chrono_io.h
|
2017-06-07 01:48:22 +00:00
|
|
|
include/ext/collection_cast.h
|
|
|
|
include/ext/enumerate.h
|
|
|
|
include/ext/function_traits.h
|
|
|
|
include/ext/identity.h
|
|
|
|
include/ext/map.h
|
|
|
|
include/ext/range.h
|
|
|
|
include/ext/scope_guard.h
|
|
|
|
include/ext/size.h
|
|
|
|
include/ext/unlock_guard.h
|
2016-02-07 21:58:58 +00:00
|
|
|
|
2019-07-05 13:48:47 +00:00
|
|
|
${CONFIG_COMMON})
|
2016-02-07 21:58:58 +00:00
|
|
|
|
2017-09-15 05:27:09 +00:00
|
|
|
if (USE_INTERNAL_MEMCPY)
|
|
|
|
set (MEMCPY_LIBRARIES memcpy)
|
|
|
|
endif ()
|
|
|
|
|
2017-01-11 13:40:02 +00:00
|
|
|
find_package (Threads)
|
|
|
|
|
2019-05-15 17:19:39 +00:00
|
|
|
if(CCTZ_INCLUDE_DIR)
|
|
|
|
target_include_directories(common BEFORE PRIVATE ${CCTZ_INCLUDE_DIR})
|
|
|
|
endif()
|
|
|
|
|
2017-08-03 12:44:39 +00:00
|
|
|
target_include_directories (common PUBLIC ${COMMON_INCLUDE_DIR})
|
2017-06-23 14:41:07 +00:00
|
|
|
|
2018-01-18 20:33:16 +00:00
|
|
|
if (NOT USE_INTERNAL_BOOST_LIBRARY)
|
2019-04-23 12:51:27 +00:00
|
|
|
target_include_directories (common SYSTEM BEFORE PUBLIC ${Boost_INCLUDE_DIRS})
|
2018-01-18 20:33:16 +00:00
|
|
|
endif ()
|
|
|
|
|
2019-04-23 12:51:27 +00:00
|
|
|
if(NOT USE_INTERNAL_POCO_LIBRARY)
|
|
|
|
target_include_directories (common SYSTEM BEFORE PUBLIC ${Poco_Foundation_INCLUDE_DIR})
|
|
|
|
endif()
|
|
|
|
|
2019-05-15 17:19:39 +00:00
|
|
|
if(CCTZ_LIBRARY)
|
|
|
|
target_link_libraries(common PRIVATE ${CCTZ_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
2020-01-19 12:26:49 +00:00
|
|
|
if (USE_REPLXX)
|
2019-12-26 15:30:25 +00:00
|
|
|
target_link_libraries(common PRIVATE replxx)
|
|
|
|
endif ()
|
|
|
|
|
2018-11-21 19:20:27 +00:00
|
|
|
target_link_libraries (common
|
|
|
|
PUBLIC
|
2019-06-14 14:00:37 +00:00
|
|
|
${Poco_Util_LIBRARY}
|
2018-11-21 19:20:27 +00:00
|
|
|
${Poco_Foundation_LIBRARY}
|
2017-08-09 20:52:55 +00:00
|
|
|
${CITYHASH_LIBRARIES}
|
2018-11-21 19:20:27 +00:00
|
|
|
PUBLIC
|
2018-08-21 23:57:59 +00:00
|
|
|
${Boost_SYSTEM_LIBRARY}
|
2018-11-21 19:20:27 +00:00
|
|
|
PRIVATE
|
2019-07-05 13:48:47 +00:00
|
|
|
${MEMCPY_LIBRARIES})
|
2016-05-28 00:16:28 +00:00
|
|
|
|
2018-02-26 00:19:42 +00:00
|
|
|
if (RT_LIBRARY)
|
2018-11-21 19:20:27 +00:00
|
|
|
target_link_libraries (common PRIVATE ${RT_LIBRARY})
|
2018-02-26 00:19:42 +00:00
|
|
|
endif ()
|
|
|
|
|
2016-12-01 22:44:59 +00:00
|
|
|
if (ENABLE_TESTS)
|
2017-04-01 07:20:54 +00:00
|
|
|
add_subdirectory (src/tests)
|
2017-04-10 17:43:30 +00:00
|
|
|
endif ()
|