diff --git a/.bazelrc b/.bazelrc index fc170b0e8b..e067710ccc 100644 --- a/.bazelrc +++ b/.bazelrc @@ -16,6 +16,10 @@ build --copt -DGRPC_BAZEL_BUILD # Workaround abseil libraries missing symbols build:windows --dynamic_mode=off +# Avoid conflicting boringssl/protobuf system brew install +# https://github.com/bazelbuild/bazel/issues/10472 +build:macos --copt=-isystem/usr/local/include + # Set minimum supported C++ version build:macos --host_cxxopt=-std=c++14 --cxxopt=-std=c++14 build:linux --host_cxxopt=-std=c++14 --cxxopt=-std=c++14 diff --git a/.gitignore b/.gitignore index dc26aa2f82..cafefd636d 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ *.app # Bazel files +MODULE.bazel.lock /bazel-* # Mac diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 0000000000..829ea0b0dc --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,25 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +module( + name = "opentelemetry-cpp", + version = "1.14.2", + compatibility_level = 0, + repo_name = "io_opentelemetry_cpp", +) + +bazel_dep(name = "abseil-cpp", version = "20240116.1", repo_name = "com_google_absl") +bazel_dep(name = "bazel_skylib", version = "1.5.0") +bazel_dep(name = "curl", version = "8.4.0") +bazel_dep(name = "grpc", version = "1.62.1", repo_name = "com_github_grpc_grpc") +bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "github_nlohmann_json") +bazel_dep(name = "opentelemetry-proto", version = "1.1.0", repo_name = "com_github_opentelemetry_proto") +bazel_dep(name = "opentracing-cpp", version = "1.6.0", repo_name = "com_github_opentracing") +bazel_dep(name = "platforms", version = "0.0.8") +bazel_dep(name = "prometheus-cpp", version = "1.2.4", repo_name = "com_github_jupp0r_prometheus_cpp") +bazel_dep(name = "protobuf", version = "26.0", repo_name = "com_google_protobuf") +bazel_dep(name = "rules_proto", version = "5.3.0-21.7") +bazel_dep(name = "zlib", version = "1.3.1.bcr.1") + +bazel_dep(name = "google_benchmark", version = "1.8.3", dev_dependency = True, repo_name = "com_github_google_benchmark") +bazel_dep(name = "googletest", version = "1.14.0.bcr.1", dev_dependency = True, repo_name = "com_google_googletest") diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod new file mode 100644 index 0000000000..0db1b04622 --- /dev/null +++ b/WORKSPACE.bzlmod @@ -0,0 +1,4 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +# Disables the default WORKSPACE when using bzlmod