Reduce building and compiling deb packages with ninja *install

This commit is contained in:
Mikhail f. Shiryaev 2023-02-13 20:04:10 +01:00
parent 726fb4bebc
commit 6a968bad8e
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -101,11 +101,7 @@ def run_docker_image_with_env(
def is_release_build(build_type, package_type, sanitizer):
return (
build_type == ""
and package_type == "deb"
and sanitizer == ""
)
return build_type == "" and package_type == "deb" and sanitizer == ""
def parse_env_variables(
@ -216,6 +212,12 @@ def parse_env_variables(
cmake_flags.append("-DCMAKE_INSTALL_PREFIX=/usr")
cmake_flags.append("-DCMAKE_INSTALL_SYSCONFDIR=/etc")
cmake_flags.append("-DCMAKE_INSTALL_LOCALSTATEDIR=/var")
# Reduce linking and building time by avoid *install/all dependencies
cmake_flags.append("-DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON")
# Add bridges to the build target
build_target = (
f"{build_target} clickhouse-odbc-bridge clickhouse-library-bridge"
)
if is_release_build(build_type, package_type, sanitizer):
cmake_flags.append("-DSPLIT_DEBUG_SYMBOLS=ON")
result.append("WITH_PERFORMANCE=1")
@ -305,7 +307,7 @@ def parse_env_variables(
cmake_flags.append("-DCLICKHOUSE_OFFICIAL_BUILD=1")
result.append('CMAKE_FLAGS="' + " ".join(cmake_flags) + '"')
result.append(f"BUILD_TARGET={build_target}")
result.append(f"BUILD_TARGET='{build_target}'")
return result