Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…ins. This commit is an attempt to fix #1161 by setting the `CMAKE` environment variable (through [`TemplateVariableInfo`]). [`TemplateVariableInfo`]: https://bazel.build/rules/lib/providers/TemplateVariableInfo Since the CMake prebuilt packages yield multiple files, we cannot use `$(execpath)` to get the path to the CMake binary, as we do for Ninja: https://github.com/bazelbuild/rules_foreign_cc/blob/c2e097455d2bbf92b2ae71611d1261ba79eb8aa8/toolchains/prebuilt_toolchains.py#L449 To circumvent this issue, this commit adds a new attribute called `tools` to the [`native_tool_toolchain`] rule. Through this attribute, extra targets can be passed to [`_resolve_tool_path`] in order to be able to expand the path to a single file using `$(execpath)`. [`native_tool_toolchain`]: https://github.com/bazelbuild/rules_foreign_cc/blob/c2e097455d2bbf92b2ae71611d1261ba79eb8aa8/toolchains/native_tools/native_tools_toolchain.bzl#L40 [`_resolve_tool_path`]: https://github.com/bazelbuild/rules_foreign_cc/blob/c2e097455d2bbf92b2ae71611d1261ba79eb8aa8/toolchains/native_tools/native_tools_toolchain.bzl#L22
- Loading branch information