|
| 1 | +# Copyright 2018- The Pixie Authors. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +# |
| 15 | +# SPDX-License-Identifier: Apache-2.0 |
| 16 | + |
| 17 | +load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") |
| 18 | + |
| 19 | +licenses(["notice"]) |
| 20 | + |
| 21 | +exports_files(["LICENSE"]) |
| 22 | + |
| 23 | +filegroup( |
| 24 | + name = "all", |
| 25 | + srcs = glob(["**"]), |
| 26 | +) |
| 27 | + |
| 28 | +cmake( |
| 29 | + name = "clickhouse_cpp", |
| 30 | + build_args = [ |
| 31 | + "--", # <- Pass remaining options to the native tool. |
| 32 | + "-j`nproc`", |
| 33 | + "-l`nproc`", |
| 34 | + ], |
| 35 | + cache_entries = { |
| 36 | + "BUILD_BENCHMARK": "OFF", |
| 37 | + "BUILD_TESTS": "OFF", |
| 38 | + "BUILD_SHARED_LIBS": "OFF", |
| 39 | + "CMAKE_BUILD_TYPE": "Release", |
| 40 | + "WITH_OPENSSL": "ON", |
| 41 | + "WITH_SYSTEM_ABSEIL": "ON", |
| 42 | + "WITH_SYSTEM_LZ4": "OFF", |
| 43 | + "WITH_SYSTEM_CITYHASH": "OFF", |
| 44 | + "WITH_SYSTEM_ZSTD": "OFF", |
| 45 | + "CMAKE_POSITION_INDEPENDENT_CODE": "ON", |
| 46 | + }, |
| 47 | + lib_source = ":all", |
| 48 | + out_static_libs = [ |
| 49 | + "libclickhouse-cpp-lib.a", |
| 50 | + "liblz4.a", |
| 51 | + "libcityhash.a", |
| 52 | + "libzstdstatic.a", |
| 53 | + ], |
| 54 | + targets = [ |
| 55 | + "clickhouse-cpp-lib", |
| 56 | + "lz4", |
| 57 | + "cityhash", |
| 58 | + "zstdstatic", |
| 59 | + ], |
| 60 | + visibility = ["//visibility:public"], |
| 61 | + working_directory = "", |
| 62 | + deps = [ |
| 63 | + "@boringssl//:crypto", |
| 64 | + "@boringssl//:ssl", |
| 65 | + "@com_google_absl//absl/numeric:int128", |
| 66 | + ], |
| 67 | +) |
0 commit comments