mirror of
https://github.com/facebook/rocksdb.git
synced 2024-12-02 10:15:54 +00:00
0d16fad51b
Summary: Make rocksdb build on macos: 1) Reorganize OS-specific flags and deps in rocksdb/src/TARGETS 2) Sandbox fbcode apple platform builds from repo root include path (which conflicts with layout of rocksdb headers). 3) Fix dep-translation for bzip2. Reviewed By: andrewjcg Differential Revision: D15125826 fbshipit-source-id: 8e143c689b88b5727e54881a5e80500f879a320b
38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
|
|
|
load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary")
|
|
load("@fbcode_macros//build_defs:custom_unittest.bzl", "custom_unittest")
|
|
|
|
def test_binary(
|
|
test_name,
|
|
test_cc,
|
|
parallelism,
|
|
rocksdb_arch_preprocessor_flags,
|
|
rocksdb_os_preprocessor_flags,
|
|
rocksdb_compiler_flags,
|
|
rocksdb_preprocessor_flags,
|
|
rocksdb_external_deps,
|
|
rocksdb_os_deps):
|
|
TEST_RUNNER = native.package_name() + "/buckifier/rocks_test_runner.sh"
|
|
|
|
ttype = "gtest" if parallelism == "parallel" else "simple"
|
|
test_bin = test_name + "_bin"
|
|
|
|
cpp_binary(
|
|
name = test_bin,
|
|
srcs = [test_cc],
|
|
arch_preprocessor_flags = rocksdb_arch_preprocessor_flags,
|
|
os_preprocessor_flags = rocksdb_os_preprocessor_flags,
|
|
compiler_flags = rocksdb_compiler_flags,
|
|
preprocessor_flags = rocksdb_preprocessor_flags,
|
|
deps = [":rocksdb_test_lib"],
|
|
os_deps = rocksdb_os_deps,
|
|
external_deps = rocksdb_external_deps,
|
|
)
|
|
|
|
custom_unittest(
|
|
name = test_name,
|
|
command = [TEST_RUNNER, "$(location :{})".format(test_bin)],
|
|
type = ttype,
|
|
)
|