-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtools.bzl
22 lines (18 loc) · 1.07 KB
/
tools.bzl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
The primary function in this file, `create_boost_aliases`, automates the creation of alias rules for Boost library targets.
The function takes a list of Boost target names and optional additional arguments for the alias rule. It supports handling Boost targets with sub-components (indicated by a dot in the target name) by properly mapping them to their corresponding Bazel targets.
The intended use for this function is in the @boost module of the Bazel Central Registry. This module provides a simple way for users to depend upon all boost libraries as a single module, and reference them using the syntax @boost//:libraryName for convenience.
"""
def create_boost_aliases(target_list, **kwargs):
""" Create aliases for a list of targets
Args:
target_list: List of targets to be aliased from the dep the the main module
**kwargs: Additional arguments to pass to the alias rule
"""
for target in target_list:
# Define the alias
native.alias(
name = target,
actual = "@boost." + target,
**kwargs
)