Skip to content

Commit f838c25

Browse files
authored
Merge pull request #65705 from ClickHouse/fix_linkage
Fix duplicate symbol linkage error
2 parents 4acfad6 + b8e8032 commit f838c25

File tree

10 files changed

+14
-387
lines changed

10 files changed

+14
-387
lines changed

programs/library-bridge/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ set (CLICKHOUSE_LIBRARY_BRIDGE_SOURCES
1111
LibraryBridgeHandlers.cpp
1212
SharedLibrary.cpp
1313
library-bridge.cpp
14-
createFunctionBaseCast.cpp
1514
)
1615

1716
clickhouse_add_executable(clickhouse-library-bridge ${CLICKHOUSE_LIBRARY_BRIDGE_SOURCES})
@@ -20,6 +19,7 @@ target_link_libraries(clickhouse-library-bridge PRIVATE
2019
daemon
2120
dbms
2221
bridge
22+
clickhouse_functions
2323
)
2424

2525
set_target_properties(clickhouse-library-bridge PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..)

programs/odbc-bridge/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ set (CLICKHOUSE_ODBC_BRIDGE_SOURCES
1313
getIdentifierQuote.cpp
1414
odbc-bridge.cpp
1515
validateODBCConnectionString.cpp
16-
createFunctionBaseCast.cpp
1716
)
1817

1918
clickhouse_add_executable(clickhouse-odbc-bridge ${CLICKHOUSE_ODBC_BRIDGE_SOURCES})
@@ -25,6 +24,7 @@ target_link_libraries(clickhouse-odbc-bridge PRIVATE
2524
clickhouse_parsers
2625
ch_contrib::nanodbc
2726
ch_contrib::unixodbc
27+
clickhouse_functions
2828
)
2929

3030
set_target_properties(clickhouse-odbc-bridge PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
clickhouse_add_executable(zkutil_test_commands zkutil_test_commands.cpp)
22
target_link_libraries(zkutil_test_commands PRIVATE
33
clickhouse_common_zookeeper_no_log
4+
clickhouse_functions
45
dbms)
56

67
clickhouse_add_executable(zkutil_test_commands_new_lib zkutil_test_commands_new_lib.cpp)
78
target_link_libraries(zkutil_test_commands_new_lib PRIVATE
89
clickhouse_common_zookeeper_no_log
910
clickhouse_compression
11+
clickhouse_functions
1012
dbms)
1113

1214
clickhouse_add_executable(zkutil_test_async zkutil_test_async.cpp)
1315
target_link_libraries(zkutil_test_async PRIVATE
1416
clickhouse_common_zookeeper_no_log
17+
clickhouse_functions
1518
dbms)

src/Common/examples/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ clickhouse_add_executable (small_table small_table.cpp)
1111
target_link_libraries (small_table PRIVATE clickhouse_common_io)
1212

1313
clickhouse_add_executable (parallel_aggregation parallel_aggregation.cpp)
14-
target_link_libraries (parallel_aggregation PRIVATE dbms)
14+
target_link_libraries (parallel_aggregation PRIVATE dbms clickhouse_functions)
1515

1616
clickhouse_add_executable (parallel_aggregation2 parallel_aggregation2.cpp)
17-
target_link_libraries (parallel_aggregation2 PRIVATE dbms)
17+
target_link_libraries (parallel_aggregation2 PRIVATE dbms clickhouse_functions)
1818

1919
clickhouse_add_executable (int_hashes_perf int_hashes_perf.cpp)
2020
target_link_libraries (int_hashes_perf PRIVATE clickhouse_common_io)
@@ -85,7 +85,7 @@ target_link_libraries (interval_tree PRIVATE dbms)
8585

8686
if (ENABLE_SSL)
8787
clickhouse_add_executable (encrypt_decrypt encrypt_decrypt.cpp)
88-
target_link_libraries (encrypt_decrypt PRIVATE dbms)
88+
target_link_libraries (encrypt_decrypt PRIVATE dbms clickhouse_functions)
8989
endif()
9090

9191
clickhouse_add_executable (check_pointer_valid check_pointer_valid.cpp)

src/Functions/CMakeLists.txt

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,9 @@ add_subdirectory(divide)
33
include("${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake")
44
add_headers_and_sources(clickhouse_functions .)
55

6-
set(DBMS_FUNCTIONS
7-
IFunction.cpp
8-
FunctionFactory.cpp
9-
FunctionHelpers.cpp
10-
extractTimeZoneFromFunctionArguments.cpp
11-
FunctionsLogical.cpp
12-
if.cpp
13-
multiIf.cpp
14-
multiMatchAny.cpp
15-
checkHyperscanRegexp.cpp
16-
array/has.cpp
17-
CastOverloadResolver.cpp
18-
# Provides dependency for cast - createFunctionBaseCast()
19-
FunctionsConversion.cpp
20-
)
21-
extract_into_parent_list(clickhouse_functions_sources dbms_sources ${DBMS_FUNCTIONS})
22-
extract_into_parent_list(clickhouse_functions_headers dbms_headers
23-
IFunction.h
24-
FunctionFactory.h
25-
FunctionHelpers.h
26-
extractTimeZoneFromFunctionArguments.h
27-
FunctionsLogical.h
28-
CastOverloadResolver.h
29-
)
30-
316
add_library(clickhouse_functions_obj OBJECT ${clickhouse_functions_headers} ${clickhouse_functions_sources})
327
if (OMIT_HEAVY_DEBUG_SYMBOLS)
338
target_compile_options(clickhouse_functions_obj PRIVATE "-g0")
34-
set_source_files_properties(${DBMS_FUNCTIONS} DIRECTORY .. PROPERTIES COMPILE_FLAGS "-g0")
359
endif()
3610

3711
list (APPEND OBJECT_LIBS $<TARGET_OBJECTS:clickhouse_functions_obj>)

0 commit comments

Comments
 (0)