Fixes to cmake toolchain so it can find CMAKE_ROOT correctly (#547)
This commit is contained in:
parent
175b29c6f7
commit
b7c0461a66
|
@ -28,16 +28,10 @@ filegroup(
|
|||
),
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "cmake_bin",
|
||||
srcs = ["bin/{bin}"],
|
||||
data = [":cmake_data"],
|
||||
)
|
||||
|
||||
native_tool_toolchain(
|
||||
name = "cmake_tool",
|
||||
path = "$(execpath :cmake_bin)",
|
||||
target = ":cmake_bin",
|
||||
path = "bin/{bin}",
|
||||
target = ":cmake_data",
|
||||
)
|
||||
"""
|
||||
|
||||
|
|
|
@ -133,16 +133,10 @@ filegroup(
|
|||
),
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "cmake_bin",
|
||||
srcs = ["bin/{{bin}}"],
|
||||
data = [":cmake_data"],
|
||||
)
|
||||
|
||||
native_tool_toolchain(
|
||||
name = "cmake_tool",
|
||||
path = "$(execpath :cmake_bin)",
|
||||
target = ":cmake_bin",
|
||||
path = "bin/{bin}",
|
||||
target = ":cmake_data",
|
||||
)
|
||||
\"\"\"
|
||||
|
||||
|
|
|
@ -7,16 +7,10 @@ load("@rules_foreign_cc//tools/build_defs/native_tools:native_tools_toolchain.bz
|
|||
"""
|
||||
|
||||
_TOOLCHAIN = """\
|
||||
native_tool_toolchain(
|
||||
name = "{repo}_tool",
|
||||
path = "$(execpath @{repo}//:{tool}_bin)",
|
||||
target = "@{repo}//:{tool}_bin",
|
||||
)
|
||||
|
||||
toolchain(
|
||||
name = "{repo}_toolchain",
|
||||
exec_compatible_with = {exec_compatible_with},
|
||||
toolchain = ":{repo}_tool",
|
||||
toolchain = "@{repo}//:{tool}_tool",
|
||||
toolchain_type = "@rules_foreign_cc//tools/build_defs:{tool}_toolchain",
|
||||
)
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue