etl/BUILD.bazel
Christoph Rüthing 82e41547bb
Make etl_profile Incompatible by Default (#1535)
* Make etl_profile Incompatible by Default

* Configure etl_profile for CI Execution of Tests

* Update _index.md

* Update _index.md

* Cherry pick the Docker fixes for PowerPC (#1563)

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>

---------

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de>
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-08-23 18:47:28 +01:00

46 lines
1.3 KiB
Python

load("@rules_cc//cc:defs.bzl", "cc_library")
package(default_visibility = ["//visibility:public"])
# ETL can be tailored to a project through an `etl_profile.h` header (see
# `include/etl/platform.h`). When no such header is on the include path, ETL
# falls back to its built-in defaults via `ETL_NO_PROFILE_HEADER`.
#
# This label_flag lets a consumer inject that profile as a Bazel target, without
# patching this BUILD file:
#
# bazel build @etl//:etl --@etl//:etl_profile=//path/to:my_etl_profile
#
# The injected target is a cc_library that exposes a single `etl_profile.h` on
# its include path, for example:
#
# cc_library(
# name = "my_etl_profile",
# hdrs = ["etl_profile.h"],
# strip_include_prefix = ".",
# )
#
# The default of this label_flag is incompatible. This makes sure that the consumer
# explicitly sets a profile, even if it is the `no_profile` defined below.
label_flag(
name = "etl_profile",
build_setting_default = ":incompatible_profile",
)
cc_library(name = "no_profile")
cc_library(
name = "incompatible_profile",
target_compatible_with = [
"@platforms//:incompatible",
],
)
cc_library(
name = "etl",
hdrs = glob(["include/**/*.h"]),
includes = ["include"],
deps = [":etl_profile"],
)