Skip to content

Commit ba4b91c

Browse files
committed
Add static libicu
1 parent 2f55d01 commit ba4b91c

File tree

6 files changed

+532
-1
lines changed

6 files changed

+532
-1
lines changed

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@
1818
path = contrib/folly
1919
url = https://github.com/facebook/folly.git
2020
branch = master
21+
[submodule "contrib/icu"]
22+
path = contrib/icu
23+
url = https://github.com/ClickHouse/icu.git
24+
[submodule "contrib/icudata"]
25+
path = contrib/icudata
26+
url = https://github.com/ClickHouse/icudata

contrib/CMakeLists.txt

+32
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ else ()
66
endif ()
77
unset (_current_dir_name)
88

9+
set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL 1)
10+
911
if (CH_ODBC_ENABLE_SSL AND NOT MSVC)
1012
if (CH_ODBC_PREFER_BUNDLED_SSL OR NOT OPENSSL_FOUND)
1113
if (NOT OPENSSL_FOUND AND NOT CH_ODBC_PREFER_BUNDLED_SSL)
@@ -90,6 +92,36 @@ if (MSVC)
9092
endif ()
9193
endif ()
9294

95+
# add_contrib cmake_folder[ base_folder1[, ...base_folderN]]
96+
function(add_contrib cmake_folder)
97+
if (ARGN)
98+
set(base_folders ${ARGN})
99+
else()
100+
set(base_folders ${cmake_folder})
101+
endif()
102+
103+
foreach (base_folder ${base_folders})
104+
# some typos in the code
105+
if (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${base_folder}")
106+
message(FATAL_ERROR "No such base folder '${base_folder}' (for '${cmake_folder}' cmake folder). Typo in the base folder name?")
107+
endif()
108+
109+
file(GLOB contrib_files "${base_folder}/*")
110+
if (NOT contrib_files)
111+
# Checking out *all* submodules takes > 5 min. Therefore, the smoke build ("FastTest") in CI initializes only the set of
112+
# submodules minimally needed for a build and we cannot assume here that all submodules are populated.
113+
message(STATUS "submodule ${base_folder} is missing or empty. to fix try run:")
114+
message(STATUS " git submodule update --init")
115+
return()
116+
endif()
117+
endforeach()
118+
119+
message(STATUS "Adding contrib module ${base_folders} (configuring with ${cmake_folder})")
120+
add_subdirectory (${cmake_folder})
121+
endfunction()
122+
123+
add_contrib (icu-cmake icu)
124+
93125
# if (CH_ODBC_PREFER_BUNDLED_FOLLY OR NOT Folly_FOUND)
94126
# if (NOT Folly_FOUND AND NOT CH_ODBC_PREFER_BUNDLED_FOLLY)
95127
# message (WARNING "Folly: unable to find system Folly, falling back to using the bundled variant of the library")

contrib/icu

Submodule icu added at 1c312f7

0 commit comments

Comments
 (0)