2020-08-19 19:51:14 +00:00
|
|
|
# The file StorageSystemContributors.cpp is generated at release time and committed to the source tree.
|
2018-11-01 14:05:37 +00:00
|
|
|
# You can also regenerate it manually this way:
|
2021-04-24 19:47:52 +00:00
|
|
|
# execute_process(COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/StorageSystemContributors.sh")
|
2018-10-26 17:43:50 +00:00
|
|
|
|
2022-09-26 13:32:12 +00:00
|
|
|
get_property (BUILD_COMPILE_DEFINITIONS DIRECTORY ${ClickHouse_SOURCE_DIR} PROPERTY COMPILE_DEFINITIONS)
|
2020-08-12 09:37:50 +00:00
|
|
|
get_property(TZDATA_VERSION GLOBAL PROPERTY TZDATA_VERSION_PROP)
|
|
|
|
|
2022-02-23 04:15:56 +00:00
|
|
|
function(generate_system_build_options)
|
|
|
|
include(${ClickHouse_SOURCE_DIR}/src/configure_config.cmake)
|
2022-09-27 07:29:18 +00:00
|
|
|
configure_file(StorageSystemBuildOptions.cpp.in StorageSystemBuildOptions.generated.cpp)
|
2022-02-23 04:15:56 +00:00
|
|
|
endfunction()
|
2022-09-26 13:32:12 +00:00
|
|
|
|
2022-02-23 04:15:56 +00:00
|
|
|
generate_system_build_options()
|
2017-03-15 18:54:31 +00:00
|
|
|
|
2021-04-24 19:47:52 +00:00
|
|
|
include("${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake")
|
2017-04-03 19:57:07 +00:00
|
|
|
add_headers_and_sources(storages_system .)
|
2022-09-27 07:29:18 +00:00
|
|
|
list (APPEND storages_system_sources StorageSystemBuildOptions.generated.cpp)
|
2019-06-20 23:50:53 +00:00
|
|
|
|
2020-05-11 02:39:01 +00:00
|
|
|
add_custom_target(generate-contributors
|
|
|
|
./StorageSystemContributors.sh
|
|
|
|
SOURCES StorageSystemContributors.sh
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
2019-06-20 23:50:53 +00:00
|
|
|
# BYPRODUCTS StorageSystemContributors.generated.cpp
|
|
|
|
)
|
2020-05-11 02:39:01 +00:00
|
|
|
|
2019-06-20 23:50:53 +00:00
|
|
|
if(NOT TARGET generate-source)
|
|
|
|
add_custom_target(generate-source)
|
|
|
|
endif()
|
2020-05-11 02:39:01 +00:00
|
|
|
|
2020-08-19 19:51:14 +00:00
|
|
|
add_dependencies(generate-source generate-contributors)
|
2020-05-11 02:39:01 +00:00
|
|
|
|
2021-04-24 19:47:52 +00:00
|
|
|
set(GENERATED_LICENSES_SRC "${CMAKE_CURRENT_BINARY_DIR}/StorageSystemLicenses.generated.cpp")
|
|
|
|
set(GENERATED_TIMEZONES_SRC "${CMAKE_CURRENT_BINARY_DIR}/StorageSystemTimeZones.generated.cpp")
|
2020-05-11 02:39:01 +00:00
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT StorageSystemLicenses.generated.cpp
|
|
|
|
COMMAND ./StorageSystemLicenses.sh > ${GENERATED_LICENSES_SRC}
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
|
|
|
list (APPEND storages_system_sources ${GENERATED_LICENSES_SRC})
|
2020-08-25 20:49:22 +00:00
|
|
|
list (APPEND storages_system_sources ${GENERATED_TIMEZONES_SRC})
|
|
|
|
|
2020-05-11 02:39:01 +00:00
|
|
|
# Overlength strings
|
|
|
|
set_source_files_properties(${GENERATED_LICENSES_SRC} PROPERTIES COMPILE_FLAGS -w)
|
|
|
|
|
2022-09-26 13:32:12 +00:00
|
|
|
include(${ClickHouse_SOURCE_DIR}/cmake/embed_binary.cmake)
|
2021-09-09 09:37:51 +00:00
|
|
|
clickhouse_embed_binaries(
|
|
|
|
TARGET information_schema_metadata
|
|
|
|
RESOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/InformationSchema/"
|
|
|
|
RESOURCES schemata.sql tables.sql views.sql columns.sql
|
|
|
|
)
|
|
|
|
|
2021-11-27 00:00:00 +00:00
|
|
|
list (SORT storages_system_sources) # Reproducible build
|
2021-11-26 23:24:09 +00:00
|
|
|
add_library(clickhouse_storages_system ${storages_system_sources})
|
2021-09-09 09:37:51 +00:00
|
|
|
|
|
|
|
add_dependencies(clickhouse_storages_system information_schema_metadata)
|
|
|
|
|
2020-07-23 21:57:45 +00:00
|
|
|
target_link_libraries(clickhouse_storages_system PRIVATE
|
|
|
|
dbms
|
|
|
|
common
|
|
|
|
string_utils
|
|
|
|
clickhouse_common_zookeeper
|
|
|
|
clickhouse_parsers
|
|
|
|
Poco::JSON
|
2021-09-09 09:37:51 +00:00
|
|
|
INTERFACE "-Wl,${WHOLE_ARCHIVE} $<TARGET_FILE:information_schema_metadata> -Wl,${NO_WHOLE_ARCHIVE}"
|
2020-07-23 21:57:45 +00:00
|
|
|
)
|