@@ -13,6 +13,7 @@ OPTION (WITH_OPENSSL "Use OpenSSL for TLS connections" OFF)
1313OPTION (WITH_SYSTEM_ABSEIL "Use system ABSEIL" OFF )
1414OPTION (WITH_SYSTEM_LZ4 "Use system LZ4" OFF )
1515OPTION (WITH_SYSTEM_CITYHASH "Use system cityhash" OFF )
16+ OPTION (DEBUG_DEPENDENCIES "Print debug info about dependencies duting build" ON )
1617
1718PROJECT (CLICKHOUSE-CLIENT)
1819
@@ -99,3 +100,36 @@ PROJECT (CLICKHOUSE-CLIENT)
99100 ut
100101 )
101102 ENDIF (BUILD_TESTS)
103+
104+ if (DEBUG_DEPENDENCIES)
105+ function (print_target_properties target )
106+ MESSAGE ("${target} properties:" )
107+ set (properties "${ARGN} " )
108+ foreach (property_name ${properties} )
109+ get_target_property (PROPERTY ${target} ${property_name} )
110+ MESSAGE (NOTICE "\t ${property_name} : ${PROPERTY} " )
111+ endforeach ()
112+
113+ # Can't get path to the target file at configure time,
114+ # so have to create a target to fetch that info at generate time.
115+ string (REPLACE ":" "_" target_plain_name ${target} )
116+ add_custom_target (${target_plain_name} _print_debug_info COMMAND ${CMAKE_COMMAND} -E echo "${target} : $<TARGET_FILE:${target} >" )
117+ add_dependencies (clickhouse-cpp-lib ${target_plain_name} _print_debug_info)
118+ endfunction ()
119+
120+ function (print_target_debug_info target )
121+ print_target_properties(${target}
122+ INCLUDE_DIRECTORIES
123+ BINARY_DIR
124+ INTERFACE_INCLUDE_DIRECTORIES
125+ INTERFACE_LINK_LIBRARIES
126+ LINK_LIBRARIES
127+ LINK_LIBRARIES_ONLY_TARGETS
128+ IMPORTED_LOCATION
129+ )
130+ endfunction ()
131+
132+ print_target_debug_info(absl::int128)
133+ print_target_debug_info(cityhash::cityhash)
134+ print_target_debug_info(lz4::lz4)
135+ endif ()
0 commit comments