You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that under some certain conditions, the CMAKE environment variable is not included in the TemplateVariableInfo object owned by the current_cmake_toolchain.
For instance, if CMake is built from source, then the variable is set:
I'm trying to compile a rust crate which uses the cmake crate in its build.rs build script. I can include the CMake toolchain in the build script processing using the build_script_toolchains annotation, but since the CMAKE environment variable isn't necessary set, the build script fails to find the CMake binary.
Do you think this is a real issue?
I've written a quick-but-unsound fix locally, but before trying to open a PR to fix it I wanted to make sure that it's a real issue.
The text was updated successfully, but these errors were encountered:
Hello,
I've noticed that under some certain conditions, the
CMAKE
environment variable is not included in theTemplateVariableInfo
object owned by thecurrent_cmake_toolchain
.For instance, if CMake is built from source, then the variable is set:
https://github.com/bazelbuild/rules_foreign_cc/blob/c2e097455d2bbf92b2ae71611d1261ba79eb8aa8/toolchains/private/BUILD.bazel#L62-L65
However, when it comes to prebuilt CMake bundle, the variable isn't set.
https://github.com/bazelbuild/rules_foreign_cc/blob/c2e097455d2bbf92b2ae71611d1261ba79eb8aa8/toolchains/prebuilt_toolchains.py#L333-L342
Note that this issue does not affect prebuilt Ninja bundles:
https://github.com/bazelbuild/rules_foreign_cc/blob/c2e097455d2bbf92b2ae71611d1261ba79eb8aa8/toolchains/prebuilt_toolchains.py#L449
I'm trying to compile a rust crate which uses the
cmake
crate in itsbuild.rs
build script. I can include the CMake toolchain in the build script processing using thebuild_script_toolchains
annotation, but since theCMAKE
environment variable isn't necessary set, the build script fails to find the CMake binary.Do you think this is a real issue?
I've written a quick-but-unsound fix locally, but before trying to open a PR to fix it I wanted to make sure that it's a real issue.
The text was updated successfully, but these errors were encountered: