CodeCommitsIssuesPull requestsActionsInsightsSecurity
030a8a4164c6eb087d139aaae89aa4b47b36919a

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cmake/find/cctz.cmake

23lines · modecode

1option (USE_INTERNAL_CCTZ_LIBRARY "Set to FALSE to use system cctz library instead of bundled" ${NOT_UNBUNDLED})
2
3if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cctz/include/cctz/time_zone.h")
4 if(USE_INTERNAL_CCTZ_LIBRARY)
5 message(WARNING "submodule contrib/cctz is missing. to fix try run: \n git submodule update --init --recursive")
6 endif()
7 set(USE_INTERNAL_CCTZ_LIBRARY 0)
8 set(MISSING_INTERNAL_CCTZ_LIBRARY 1)
9endif()
10
11if (NOT USE_INTERNAL_CCTZ_LIBRARY)
12 find_library (CCTZ_LIBRARY cctz)
13 find_path (CCTZ_INCLUDE_DIR NAMES cctz/civil_time.h civil_time.h PATHS ${CCTZ_INCLUDE_PATHS})
14endif ()
15
16if (CCTZ_LIBRARY AND CCTZ_INCLUDE_DIR)
17elseif (NOT MISSING_INTERNAL_CCTZ_LIBRARY)
18 set (USE_INTERNAL_CCTZ_LIBRARY 1)
19 set (CCTZ_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/cctz/include")
20 set (CCTZ_LIBRARY cctz)
21endif ()
22
23message (STATUS "Using cctz: ${CCTZ_INCLUDE_DIR} : ${CCTZ_LIBRARY}")