mirror of
https://github.com/bazel-contrib/rules_foreign_cc
synced 2024-11-28 08:43:26 +00:00
fix: expose CMAKE env variable from cmake toolchains (#911)
This change updates the definitions of cmake toolchains to expose CMAKE environment variable that makes it easier to integrate the toolchain with other build rules (e.g., with rules_rust).
This commit is contained in:
parent
78c5f77385
commit
324dbd13cf
|
@ -148,6 +148,10 @@ native_tool_toolchain(
|
|||
|
||||
native_tool_toolchain(
|
||||
name = "preinstalled_cmake",
|
||||
env = select({
|
||||
"@platforms//os:windows": {"CMAKE": "cmake.exe"},
|
||||
"//conditions:default": {"CMAKE": "cmake"},
|
||||
}),
|
||||
path = select({
|
||||
"@platforms//os:windows": "cmake.exe",
|
||||
"//conditions:default": "cmake",
|
||||
|
@ -162,6 +166,10 @@ cmake_tool(
|
|||
|
||||
native_tool_toolchain(
|
||||
name = "built_cmake",
|
||||
env = select({
|
||||
"@platforms//os:windows": {"CMAKE": "$(execpath :cmake_tool)/bin/cmake.exe"},
|
||||
"//conditions:default": {"CMAKE": "$(execpath :cmake_tool)/bin/cmake"},
|
||||
}),
|
||||
path = select({
|
||||
"@platforms//os:windows": "$(execpath :cmake_tool)/bin/cmake.exe",
|
||||
"//conditions:default": "$(execpath :cmake_tool)/bin/cmake",
|
||||
|
|
Loading…
Reference in a new issue