2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-11-28 08:43:26 +00:00

Update cmake and ninja versions (#996)

This commit is contained in:
James Sharpe 2023-02-05 20:07:54 +00:00 committed by GitHub
parent 34fa6a796d
commit e3699b940f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 2071 additions and 392 deletions

View file

@ -11,7 +11,7 @@ def rules_foreign_cc_dependencies(
register_default_tools = True, register_default_tools = True,
cmake_version = "3.23.2", cmake_version = "3.23.2",
make_version = "4.4", make_version = "4.4",
ninja_version = "1.11.0", ninja_version = "1.11.1",
pkgconfig_version = "0.29.2", pkgconfig_version = "0.29.2",
register_preinstalled_tools = True, register_preinstalled_tools = True,
register_built_tools = True, register_built_tools = True,

View file

@ -5,6 +5,7 @@ from source
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("@rules_foreign_cc//toolchains:cmake_versions.bzl", _CMAKE_SRCS = "CMAKE_SRCS")
_ALL_CONTENT = """\ _ALL_CONTENT = """\
filegroup( filegroup(
@ -14,22 +15,6 @@ filegroup(
) )
""" """
_CMAKE_SRCS = {
"3.21.0": [["https://github.com/Kitware/CMake/releases/download/v3.21.0/cmake-3.21.0.tar.gz"], "cmake-3.21.0", "4a42d56449a51f4d3809ab4d3b61fd4a96a469e56266e896ce1009b5768bd2ab"],
"3.21.1": [["https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1.tar.gz"], "cmake-3.21.1", "fac3915171d4dff25913975d712f76e69aef44bf738ba7b976793a458b4cfed4"],
"3.21.2": [["https://github.com/Kitware/CMake/releases/download/v3.21.2/cmake-3.21.2.tar.gz"], "cmake-3.21.2", "94275e0b61c84bb42710f5320a23c6dcb2c6ee032ae7d2a616f53f68b3d21659"],
"3.21.3": [["https://github.com/Kitware/CMake/releases/download/v3.21.3/cmake-3.21.3.tar.gz"], "cmake-3.21.3", "d14d06df4265134ee42c4d50f5a60cb8b471b7b6a47da8e5d914d49dd783794f"],
"3.21.4": [["https://github.com/Kitware/CMake/releases/download/v3.21.4/cmake-3.21.4.tar.gz"], "cmake-3.21.4", "d9570a95c215f4c9886dd0f0564ca4ef8d18c30750f157238ea12669c2985978"],
"3.21.5": [["https://github.com/Kitware/CMake/releases/download/v3.21.5/cmake-3.21.5.tar.gz"], "cmake-3.21.5", "c73587b5ab827d56c09f0a1e256b12743ff200495e31fc9686f2b9dc8a28897f"],
"3.22.0": [["https://github.com/Kitware/CMake/releases/download/v3.22.0/cmake-3.22.0.tar.gz"], "cmake-3.22.0", "998c7ba34778d2dfdb3df8a695469e24b11e2bfa21fbe41b361a3f45e1c9345e"],
"3.22.1": [["https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1.tar.gz"], "cmake-3.22.1", "0e998229549d7b3f368703d20e248e7ee1f853910d42704aa87918c213ea82c0"],
"3.22.2": [["https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2.tar.gz"], "cmake-3.22.2", "3c1c478b9650b107d452c5bd545c72e2fad4e37c09b89a1984b9a2f46df6aced"],
"3.22.3": [["https://github.com/Kitware/CMake/releases/download/v3.22.3/cmake-3.22.3.tar.gz"], "cmake-3.22.3", "9f8469166f94553b6978a16ee29227ec49a2eb5ceb608275dec40d8ae0d1b5a0"],
"3.22.4": [["https://github.com/Kitware/CMake/releases/download/v3.22.4/cmake-3.22.4.tar.gz"], "cmake-3.22.4", "5c55d0b0bc4c191549e3502b8f99a4fe892077611df22b4178cc020626e22a47"],
"3.23.1": [["https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1.tar.gz"], "cmake-3.23.1", "33fd10a8ec687a4d0d5b42473f10459bb92b3ae7def2b745dc10b192760869f3"],
"3.23.2": [["https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2.tar.gz"], "cmake-3.23.2", "f316b40053466f9a416adf981efda41b160ca859e97f6a484b447ea299ff26aa"],
}
# buildifier: disable=unnamed-macro # buildifier: disable=unnamed-macro
def built_toolchains(cmake_version, make_version, ninja_version, pkgconfig_version, register_toolchains, register_built_pkgconfig_toolchain): def built_toolchains(cmake_version, make_version, ninja_version, pkgconfig_version, register_toolchains, register_built_pkgconfig_toolchain):
""" """
@ -77,357 +62,6 @@ def _cmake_toolchain(version, register_toolchains):
) )
return return
if "3.20.5" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "12c8040ef5c6f1bc5b8868cede16bb7926c18980f59779e299ab52cbc6f15bb0",
strip_prefix = "cmake-3.20.5",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.20.5/cmake-3.20.5.tar.gz",
],
)
return
if "3.20.4" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "87a4060298f2c6bb09d479de1400bc78195a5b55a65622a7dceeb3d1090a1b16",
strip_prefix = "cmake-3.20.4",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.20.4/cmake-3.20.4.tar.gz",
],
)
return
if "3.20.3" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "4d008ac3461e271fcfac26a05936f77fc7ab64402156fb371d41284851a651b8",
strip_prefix = "cmake-3.20.3",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.20.3/cmake-3.20.3.tar.gz",
],
)
return
if "3.20.2" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "aecf6ecb975179eb3bb6a4a50cae192d41e92b9372b02300f9e8f1d5f559544e",
strip_prefix = "cmake-3.20.2",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.20.2/cmake-3.20.2.tar.gz",
],
)
return
if "3.20.1" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "3f1808b9b00281df06c91dd7a021d7f52f724101000da7985a401678dfe035b0",
strip_prefix = "cmake-3.20.1",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1.tar.gz",
],
)
return
if "3.20.0" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "9c06b2ddf7c337e31d8201f6ebcd3bba86a9a033976a9aee207fe0c6971f4755",
strip_prefix = "cmake-3.20.0",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0.tar.gz",
],
)
return
if "3.19.7" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "58a15f0d56a0afccc3cc5371234fce73fcc6c8f9dbd775d898e510b83175588e",
strip_prefix = "cmake-3.19.7",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.19.7/cmake-3.19.7.tar.gz",
],
)
return
if "3.19.6" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "ec87ab67c45f47c4285f204280c5cde48e1c920cfcfed1555b27fb3b1a1d20ba",
strip_prefix = "cmake-3.19.6",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.19.6/cmake-3.19.6.tar.gz",
],
)
return
if "3.18.6" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "124f571ab70332da97a173cb794dfa09a5b20ccbb80a08e56570a500f47b6600",
strip_prefix = "cmake-3.18.6",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.18.6/cmake-3.18.6.tar.gz",
],
)
return
if "3.17.5" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "8c3083d98fd93c1228d5e4e40dbff2dd88f4f7b73b9fa24a2938627b8bc28f1a",
strip_prefix = "cmake-3.17.5",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.17.5/cmake-3.17.5.tar.gz",
],
)
return
if "3.16.9" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "1708361827a5a0de37d55f5c9698004c035abb1de6120a376d5d59a81630191f",
strip_prefix = "cmake-3.16.9",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.16.9/cmake-3.16.9.tar.gz",
],
)
return
if "3.15.7" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "71999d8a14c9b51708847371250a61533439a7331eb7702ac105cfb3cb1be54b",
strip_prefix = "cmake-3.15.7",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.15.7/cmake-3.15.7.tar.gz",
],
)
return
if "3.14.7" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "9221993e0af3e6d10124d840ff24f5b2f3b884416fca04d3312cb0388dec1385",
strip_prefix = "cmake-3.14.7",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.14.7/cmake-3.14.7.tar.gz",
],
)
return
if "3.13.5" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "526db6a4b47772d1943b2f86de693e712f9dacf3d7c13b19197c9bef133766a5",
strip_prefix = "cmake-3.13.5",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.13.5/cmake-3.13.5.tar.gz",
],
)
return
if "3.12.4" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "5255584bfd043eb717562cff8942d472f1c0e4679c4941d84baadaa9b28e3194",
strip_prefix = "cmake-3.12.4",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4.tar.gz",
],
)
return
if "3.11.4" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "8f864e9f78917de3e1483e256270daabc4a321741592c5b36af028e72bff87f5",
strip_prefix = "cmake-3.11.4",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.11.4/cmake-3.11.4.tar.gz",
],
)
return
if "3.10.3" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "0c3a1dcf0be03e40cf4f341dda79c96ffb6c35ae35f2f911845b72dab3559cf8",
strip_prefix = "cmake-3.10.3",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.10.3/cmake-3.10.3.tar.gz",
],
)
return
if "3.9.6" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "7410851a783a41b521214ad987bb534a7e4a65e059651a2514e6ebfc8f46b218",
strip_prefix = "cmake-3.9.6",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.9.6/cmake-3.9.6.tar.gz",
],
)
return
if "3.8.2" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d",
strip_prefix = "cmake-3.8.2",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.8.2/cmake-3.8.2.tar.gz",
],
)
return
if "3.7.2" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "dc1246c4e6d168ea4d6e042cfba577c1acd65feea27e56f5ff37df920c30cae0",
strip_prefix = "cmake-3.7.2",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.7.2/cmake-3.7.2.tar.gz",
],
)
return
if "3.6.3" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "7d73ee4fae572eb2d7cd3feb48971aea903bb30a20ea5ae8b4da826d8ccad5fe",
strip_prefix = "cmake-3.6.3",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.6.3/cmake-3.6.3.tar.gz",
],
)
return
if "3.5.2" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a",
strip_prefix = "cmake-3.5.2",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.5.2/cmake-3.5.2.tar.gz",
],
)
return
if "3.4.3" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "b73f8c1029611df7ed81796bf5ca8ba0ef41c6761132340c73ffe42704f980fa",
strip_prefix = "cmake-3.4.3",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.4.3/cmake-3.4.3.tar.gz",
],
)
return
if "3.3.2" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "e75a178d6ebf182b048ebfe6e0657c49f0dc109779170bad7ffcb17463f2fc22",
strip_prefix = "cmake-3.3.2",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.3.2/cmake-3.3.2.tar.gz",
],
)
return
if "3.2.3" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "a1ebcaf6d288eb4c966714ea457e3b9677cdfde78820d0f088712d7320850297",
strip_prefix = "cmake-3.2.3",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.2.3/cmake-3.2.3.tar.gz",
],
)
return
if "3.1.3" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "45f4d3fa8a2f61cc092ae461aac4cac1bab4ac6706f98274ea7f314dd315c6d0",
strip_prefix = "cmake-3.1.3",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.1.3/cmake-3.1.3.tar.gz",
],
)
return
if "3.0.2" == version:
maybe(
http_archive,
name = "cmake_src",
build_file_content = _ALL_CONTENT,
sha256 = "6b4ea61eadbbd9bec0ccb383c29d1f4496eacc121ef7acf37c7a24777805693e",
strip_prefix = "cmake-3.0.2",
urls = [
"https://github.com/Kitware/CMake/releases/download/v3.0.2/cmake-3.0.2.tar.gz",
],
)
return
fail("Unsupported cmake version: " + str(version)) fail("Unsupported cmake version: " + str(version))
def _make_toolchain(version, register_toolchains): def _make_toolchain(version, register_toolchains):
@ -470,6 +104,18 @@ def _ninja_toolchain(version, register_toolchains):
native.register_toolchains( native.register_toolchains(
"@rules_foreign_cc//toolchains:built_ninja_toolchain", "@rules_foreign_cc//toolchains:built_ninja_toolchain",
) )
if version == "1.11.1":
maybe(
http_archive,
name = "ninja_build_src",
build_file_content = _ALL_CONTENT,
sha256 = "31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea",
strip_prefix = "ninja-1.11.1",
urls = [
"https://github.com/ninja-build/ninja/archive/v1.11.1.tar.gz",
],
)
return
if version == "1.11.0": if version == "1.11.0":
maybe( maybe(
http_archive, http_archive,

View file

@ -0,0 +1,401 @@
""" A U T O G E N E R A T E D -- D O N O T M O D I F Y
@generated
This file is generated by prebuilt_toolchains.py
"""
CMAKE_SRCS = {
"3.0.2": [
[
"https://github.com/Kitware/CMake/releases/download/v3.0.2/cmake-3.0.2.tar.gz",
],
"cmake-3.0.2",
"6b4ea61eadbbd9bec0ccb383c29d1f4496eacc121ef7acf37c7a24777805693e",
],
"3.1.3": [
[
"https://github.com/Kitware/CMake/releases/download/v3.1.3/cmake-3.1.3.tar.gz",
],
"cmake-3.1.3",
"45f4d3fa8a2f61cc092ae461aac4cac1bab4ac6706f98274ea7f314dd315c6d0",
],
"3.10.3": [
[
"https://github.com/Kitware/CMake/releases/download/v3.10.3/cmake-3.10.3.tar.gz",
],
"cmake-3.10.3",
"0c3a1dcf0be03e40cf4f341dda79c96ffb6c35ae35f2f911845b72dab3559cf8",
],
"3.11.4": [
[
"https://github.com/Kitware/CMake/releases/download/v3.11.4/cmake-3.11.4.tar.gz",
],
"cmake-3.11.4",
"8f864e9f78917de3e1483e256270daabc4a321741592c5b36af028e72bff87f5",
],
"3.12.4": [
[
"https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4.tar.gz",
],
"cmake-3.12.4",
"5255584bfd043eb717562cff8942d472f1c0e4679c4941d84baadaa9b28e3194",
],
"3.13.5": [
[
"https://github.com/Kitware/CMake/releases/download/v3.13.5/cmake-3.13.5.tar.gz",
],
"cmake-3.13.5",
"526db6a4b47772d1943b2f86de693e712f9dacf3d7c13b19197c9bef133766a5",
],
"3.14.7": [
[
"https://github.com/Kitware/CMake/releases/download/v3.14.7/cmake-3.14.7.tar.gz",
],
"cmake-3.14.7",
"9221993e0af3e6d10124d840ff24f5b2f3b884416fca04d3312cb0388dec1385",
],
"3.15.7": [
[
"https://github.com/Kitware/CMake/releases/download/v3.15.7/cmake-3.15.7.tar.gz",
],
"cmake-3.15.7",
"71999d8a14c9b51708847371250a61533439a7331eb7702ac105cfb3cb1be54b",
],
"3.16.9": [
[
"https://github.com/Kitware/CMake/releases/download/v3.16.9/cmake-3.16.9.tar.gz",
],
"cmake-3.16.9",
"1708361827a5a0de37d55f5c9698004c035abb1de6120a376d5d59a81630191f",
],
"3.17.5": [
[
"https://github.com/Kitware/CMake/releases/download/v3.17.5/cmake-3.17.5.tar.gz",
],
"cmake-3.17.5",
"8c3083d98fd93c1228d5e4e40dbff2dd88f4f7b73b9fa24a2938627b8bc28f1a",
],
"3.18.6": [
[
"https://github.com/Kitware/CMake/releases/download/v3.18.6/cmake-3.18.6.tar.gz",
],
"cmake-3.18.6",
"124f571ab70332da97a173cb794dfa09a5b20ccbb80a08e56570a500f47b6600",
],
"3.19.5": [
[
"https://github.com/Kitware/CMake/releases/download/v3.19.5/cmake-3.19.5.tar.gz",
],
"cmake-3.19.5",
"c432296eb5dec6d71eae15d140f6297d63df44e9ffe3e453628d1dc8fc4201ce",
],
"3.19.6": [
[
"https://github.com/Kitware/CMake/releases/download/v3.19.6/cmake-3.19.6.tar.gz",
],
"cmake-3.19.6",
"ec87ab67c45f47c4285f204280c5cde48e1c920cfcfed1555b27fb3b1a1d20ba",
],
"3.19.7": [
[
"https://github.com/Kitware/CMake/releases/download/v3.19.7/cmake-3.19.7.tar.gz",
],
"cmake-3.19.7",
"58a15f0d56a0afccc3cc5371234fce73fcc6c8f9dbd775d898e510b83175588e",
],
"3.19.8": [
[
"https://github.com/Kitware/CMake/releases/download/v3.19.8/cmake-3.19.8.tar.gz",
],
"cmake-3.19.8",
"09b4fa4837aae55c75fb170f6a6e2b44818deba48335d1969deddfbb34e30369",
],
"3.2.3": [
[
"https://github.com/Kitware/CMake/releases/download/v3.2.3/cmake-3.2.3.tar.gz",
],
"cmake-3.2.3",
"a1ebcaf6d288eb4c966714ea457e3b9677cdfde78820d0f088712d7320850297",
],
"3.20.0": [
[
"https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0.tar.gz",
],
"cmake-3.20.0",
"9c06b2ddf7c337e31d8201f6ebcd3bba86a9a033976a9aee207fe0c6971f4755",
],
"3.20.1": [
[
"https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1.tar.gz",
],
"cmake-3.20.1",
"3f1808b9b00281df06c91dd7a021d7f52f724101000da7985a401678dfe035b0",
],
"3.20.2": [
[
"https://github.com/Kitware/CMake/releases/download/v3.20.2/cmake-3.20.2.tar.gz",
],
"cmake-3.20.2",
"aecf6ecb975179eb3bb6a4a50cae192d41e92b9372b02300f9e8f1d5f559544e",
],
"3.20.3": [
[
"https://github.com/Kitware/CMake/releases/download/v3.20.3/cmake-3.20.3.tar.gz",
],
"cmake-3.20.3",
"4d008ac3461e271fcfac26a05936f77fc7ab64402156fb371d41284851a651b8",
],
"3.20.4": [
[
"https://github.com/Kitware/CMake/releases/download/v3.20.4/cmake-3.20.4.tar.gz",
],
"cmake-3.20.4",
"87a4060298f2c6bb09d479de1400bc78195a5b55a65622a7dceeb3d1090a1b16",
],
"3.20.5": [
[
"https://github.com/Kitware/CMake/releases/download/v3.20.5/cmake-3.20.5.tar.gz",
],
"cmake-3.20.5",
"12c8040ef5c6f1bc5b8868cede16bb7926c18980f59779e299ab52cbc6f15bb0",
],
"3.20.6": [
[
"https://github.com/Kitware/CMake/releases/download/v3.20.6/cmake-3.20.6.tar.gz",
],
"cmake-3.20.6",
"a0bd485e1a38dd13c0baec89d5f4adbf61c7fd32fddb38eabc69a75bc0b65d72",
],
"3.21.0": [
[
"https://github.com/Kitware/CMake/releases/download/v3.21.0/cmake-3.21.0.tar.gz",
],
"cmake-3.21.0",
"4a42d56449a51f4d3809ab4d3b61fd4a96a469e56266e896ce1009b5768bd2ab",
],
"3.21.1": [
[
"https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1.tar.gz",
],
"cmake-3.21.1",
"fac3915171d4dff25913975d712f76e69aef44bf738ba7b976793a458b4cfed4",
],
"3.21.2": [
[
"https://github.com/Kitware/CMake/releases/download/v3.21.2/cmake-3.21.2.tar.gz",
],
"cmake-3.21.2",
"94275e0b61c84bb42710f5320a23c6dcb2c6ee032ae7d2a616f53f68b3d21659",
],
"3.21.3": [
[
"https://github.com/Kitware/CMake/releases/download/v3.21.3/cmake-3.21.3.tar.gz",
],
"cmake-3.21.3",
"d14d06df4265134ee42c4d50f5a60cb8b471b7b6a47da8e5d914d49dd783794f",
],
"3.21.4": [
[
"https://github.com/Kitware/CMake/releases/download/v3.21.4/cmake-3.21.4.tar.gz",
],
"cmake-3.21.4",
"d9570a95c215f4c9886dd0f0564ca4ef8d18c30750f157238ea12669c2985978",
],
"3.21.5": [
[
"https://github.com/Kitware/CMake/releases/download/v3.21.5/cmake-3.21.5.tar.gz",
],
"cmake-3.21.5",
"c73587b5ab827d56c09f0a1e256b12743ff200495e31fc9686f2b9dc8a28897f",
],
"3.21.6": [
[
"https://github.com/Kitware/CMake/releases/download/v3.21.6/cmake-3.21.6.tar.gz",
],
"cmake-3.21.6",
"b7c3ac35ca7ed3cce8c192c9c873e6061aaecc8b2bc564290e629b10bff59f3c",
],
"3.22.0": [
[
"https://github.com/Kitware/CMake/releases/download/v3.22.0/cmake-3.22.0.tar.gz",
],
"cmake-3.22.0",
"998c7ba34778d2dfdb3df8a695469e24b11e2bfa21fbe41b361a3f45e1c9345e",
],
"3.22.1": [
[
"https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1.tar.gz",
],
"cmake-3.22.1",
"0e998229549d7b3f368703d20e248e7ee1f853910d42704aa87918c213ea82c0",
],
"3.22.2": [
[
"https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2.tar.gz",
],
"cmake-3.22.2",
"3c1c478b9650b107d452c5bd545c72e2fad4e37c09b89a1984b9a2f46df6aced",
],
"3.22.3": [
[
"https://github.com/Kitware/CMake/releases/download/v3.22.3/cmake-3.22.3.tar.gz",
],
"cmake-3.22.3",
"9f8469166f94553b6978a16ee29227ec49a2eb5ceb608275dec40d8ae0d1b5a0",
],
"3.22.4": [
[
"https://github.com/Kitware/CMake/releases/download/v3.22.4/cmake-3.22.4.tar.gz",
],
"cmake-3.22.4",
"5c55d0b0bc4c191549e3502b8f99a4fe892077611df22b4178cc020626e22a47",
],
"3.22.5": [
[
"https://github.com/Kitware/CMake/releases/download/v3.22.5/cmake-3.22.5.tar.gz",
],
"cmake-3.22.5",
"d3987c3f7759fa0a401c5fcd5076be44a19613bfaa8baee1b5d1835750dc5375",
],
"3.22.6": [
[
"https://github.com/Kitware/CMake/releases/download/v3.22.6/cmake-3.22.6.tar.gz",
],
"cmake-3.22.6",
"73933163670ea4ea95c231549007b0c7243282293506a2cf4443714826ad5ec3",
],
"3.23.1": [
[
"https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1.tar.gz",
],
"cmake-3.23.1",
"33fd10a8ec687a4d0d5b42473f10459bb92b3ae7def2b745dc10b192760869f3",
],
"3.23.2": [
[
"https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2.tar.gz",
],
"cmake-3.23.2",
"f316b40053466f9a416adf981efda41b160ca859e97f6a484b447ea299ff26aa",
],
"3.23.3": [
[
"https://github.com/Kitware/CMake/releases/download/v3.23.3/cmake-3.23.3.tar.gz",
],
"cmake-3.23.3",
"06fefaf0ad94989724b56f733093c2623f6f84356e5beb955957f9ce3ee28809",
],
"3.23.4": [
[
"https://github.com/Kitware/CMake/releases/download/v3.23.4/cmake-3.23.4.tar.gz",
],
"cmake-3.23.4",
"aa8b6c17a5adf04de06e42c06adc7e25b21e4fe8378f44f703a861e5f6ac59c7",
],
"3.23.5": [
[
"https://github.com/Kitware/CMake/releases/download/v3.23.5/cmake-3.23.5.tar.gz",
],
"cmake-3.23.5",
"f2944cde7a140b992ba5ccea2009a987a92413762250de22ebbace2319a0f47d",
],
"3.24.0": [
[
"https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0.tar.gz",
],
"cmake-3.24.0",
"c2b61f7cdecb1576cad25f918a8f42b8685d88a832fd4b62b9e0fa32e915a658",
],
"3.24.1": [
[
"https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1.tar.gz",
],
"cmake-3.24.1",
"4931e277a4db1a805f13baa7013a7757a0cbfe5b7932882925c7061d9d1fa82b",
],
"3.24.2": [
[
"https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2.tar.gz",
],
"cmake-3.24.2",
"0d9020f06f3ddf17fb537dc228e1a56c927ee506b486f55fe2dc19f69bf0c8db",
],
"3.24.3": [
[
"https://github.com/Kitware/CMake/releases/download/v3.24.3/cmake-3.24.3.tar.gz",
],
"cmake-3.24.3",
"b53aa10fa82bff84ccdb59065927b72d3bee49f4d86261249fc0984b3b367291",
],
"3.25.0": [
[
"https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0.tar.gz",
],
"cmake-3.25.0",
"306463f541555da0942e6f5a0736560f70c487178b9d94a5ae7f34d0538cdd48",
],
"3.25.1": [
[
"https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1.tar.gz",
],
"cmake-3.25.1",
"1c511d09516af493694ed9baf13c55947a36389674d657a2d5e0ccedc6b291d8",
],
"3.25.2": [
[
"https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2.tar.gz",
],
"cmake-3.25.2",
"c026f22cb931dd532f648f087d587f07a1843c6e66a3dfca4fb0ea21944ed33c",
],
"3.3.2": [
[
"https://github.com/Kitware/CMake/releases/download/v3.3.2/cmake-3.3.2.tar.gz",
],
"cmake-3.3.2",
"e75a178d6ebf182b048ebfe6e0657c49f0dc109779170bad7ffcb17463f2fc22",
],
"3.4.3": [
[
"https://github.com/Kitware/CMake/releases/download/v3.4.3/cmake-3.4.3.tar.gz",
],
"cmake-3.4.3",
"b73f8c1029611df7ed81796bf5ca8ba0ef41c6761132340c73ffe42704f980fa",
],
"3.5.2": [
[
"https://github.com/Kitware/CMake/releases/download/v3.5.2/cmake-3.5.2.tar.gz",
],
"cmake-3.5.2",
"92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a",
],
"3.6.3": [
[
"https://github.com/Kitware/CMake/releases/download/v3.6.3/cmake-3.6.3.tar.gz",
],
"cmake-3.6.3",
"7d73ee4fae572eb2d7cd3feb48971aea903bb30a20ea5ae8b4da826d8ccad5fe",
],
"3.7.2": [
[
"https://github.com/Kitware/CMake/releases/download/v3.7.2/cmake-3.7.2.tar.gz",
],
"cmake-3.7.2",
"dc1246c4e6d168ea4d6e042cfba577c1acd65feea27e56f5ff37df920c30cae0",
],
"3.8.2": [
[
"https://github.com/Kitware/CMake/releases/download/v3.8.2/cmake-3.8.2.tar.gz",
],
"cmake-3.8.2",
"da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d",
],
"3.9.6": [
[
"https://github.com/Kitware/CMake/releases/download/v3.9.6/cmake-3.9.6.tar.gz",
],
"cmake-3.9.6",
"7410851a783a41b521214ad987bb534a7e4a65e059651a2514e6ebfc8f46b218",
],
}

File diff suppressed because it is too large Load diff

View file

@ -10,19 +10,33 @@ CMAKE_SHA256_URL_TEMPLATE = "https://cmake.org/files/v{minor}/cmake-{full}-SHA-2
CMAKE_URL_TEMPLATE = "https://github.com/Kitware/CMake/releases/download/v{full}/{file}" CMAKE_URL_TEMPLATE = "https://github.com/Kitware/CMake/releases/download/v{full}/{file}"
CMAKE_VERSIONS = [ CMAKE_VERSIONS = [
"3.25.2",
"3.25.1",
"3.25.0",
"3.24.3",
"3.24.2",
"3.24.1",
"3.24.0",
"3.23.5",
"3.23.4",
"3.23.3",
"3.23.2", "3.23.2",
"3.23.1", "3.23.1",
"3.22.6",
"3.22.5",
"3.22.4", "3.22.4",
"3.22.3", "3.22.3",
"3.22.2", "3.22.2",
"3.22.1", "3.22.1",
"3.22.0", "3.22.0",
"3.21.6",
"3.21.5", "3.21.5",
"3.21.4", "3.21.4",
"3.21.3", "3.21.3",
"3.21.2", "3.21.2",
"3.21.1", "3.21.1",
"3.21.0", "3.21.0",
"3.20.6",
"3.20.5", "3.20.5",
"3.20.4", "3.20.4",
"3.20.3", "3.20.3",
@ -116,6 +130,7 @@ NINJA_TARGETS = {
} }
NINJA_VERSIONS = ( NINJA_VERSIONS = (
"1.11.1",
"1.11.0", "1.11.0",
"1.10.2", "1.10.2",
"1.10.1", "1.10.1",
@ -224,18 +239,24 @@ def prebuilt_toolchains(cmake_version, ninja_version, register_toolchains):
\"\"\" \"\"\"
_cmake_toolchains(cmake_version, register_toolchains) _cmake_toolchains(cmake_version, register_toolchains)
_ninja_toolchains(ninja_version, register_toolchains) _ninja_toolchains(ninja_version, register_toolchains)
_make_toolchains(register_toolchains)
def _cmake_toolchains(version, register_toolchains): def _cmake_toolchains(version, register_toolchains):
{cmake_definitions} {cmake_definitions}
def _ninja_toolchains(version, register_toolchains): def _ninja_toolchains(version, register_toolchains):
{ninja_definitions} {ninja_definitions}
def _make_toolchains(register_toolchains):
{make_definitions}
""" """
BZL_CMAKE_FILE_TEMPLATE = """\
\"\"\" A U T O G E N E R A T E D -- D O N O T M O D I F Y
@generated
This file is generated by prebuilt_toolchains.py
\"\"\"
CMAKE_SRCS = {cmake_src_versions}
"""
def get_cmake_definitions() -> str: def get_cmake_definitions() -> str:
"""Define a set of repositories and calls for registering `cmake` toolchains """Define a set of repositories and calls for registering `cmake` toolchains
@ -245,9 +266,10 @@ def get_cmake_definitions() -> str:
""" """
archives = [] archives = []
cmake_src_versions = dict()
for version in CMAKE_VERSIONS: for version in CMAKE_VERSIONS:
major, minor, _patch = version.split(".") major, minor, patch = version.split(".")
version_archives = [] version_archives = []
version_toolchains = {} version_toolchains = {}
@ -269,10 +291,13 @@ def get_cmake_definitions() -> str:
plat_target = target plat_target = target
break break
sha256, file = line.split()
if not plat_target: if not plat_target:
if line.endswith(f"cmake-{major}.{minor}.{patch}.tar.gz"):
cmake_src_versions[f"{major}.{minor}.{patch}"] = [[CMAKE_URL_TEMPLATE.format(full=version, file=file)], f"cmake-{major}.{minor}.{patch}", sha256]
continue continue
sha256, file = line.split()
name = file.replace(".tar.gz", "").replace(".zip", "") name = file.replace(".tar.gz", "").replace(".zip", "")
bin = "cmake.exe" if "win" in file.lower() else "cmake" bin = "cmake.exe" if "win" in file.lower() else "cmake"
@ -349,7 +374,7 @@ def get_cmake_definitions() -> str:
archives.append(indent('fail("Unsupported version: " + str(version))', " " * 4)) archives.append(indent('fail("Unsupported version: " + str(version))', " " * 4))
return "\n".join([archive.rstrip(" ") for archive in archives]) return "\n".join([archive.rstrip(" ") for archive in archives]), json.dumps(cmake_src_versions, indent=4, sort_keys=True, default=str)
def get_ninja_definitions() -> str: def get_ninja_definitions() -> str:
@ -460,25 +485,24 @@ def get_ninja_definitions() -> str:
return "\n".join(archives) return "\n".join(archives)
def get_make_definitions() -> str:
"""Define a set of repositories and calls for registering `make` toolchains
Returns:
str: The Implementation of `_make_toolchains`
"""
return indent("# There are currently no prebuilt make binaries\npass", " " * 4)
def main(): def main():
"""The main entrypoint of the toolchains generator""" """The main entrypoint of the toolchains generator"""
repos_bzl_file = Path(__file__).parent.absolute() / "prebuilt_toolchains.bzl" repos_bzl_file = Path(__file__).parent.absolute() / "prebuilt_toolchains.bzl"
cmake_definitions, cmake_src_versions = get_cmake_definitions()
repos_bzl_file.write_text( repos_bzl_file.write_text(
BZL_FILE_TEMPLATE.format( BZL_FILE_TEMPLATE.format(
cmake_definitions=get_cmake_definitions(), cmake_definitions=cmake_definitions,
ninja_definitions=get_ninja_definitions(), ninja_definitions=get_ninja_definitions(),
make_definitions=get_make_definitions(), )
)
cmake_versions_file = Path(__file__).parent.absolute() / "cmake_versions.bzl"
cmake_versions_file.write_text(
BZL_CMAKE_FILE_TEMPLATE.format(
cmake_src_versions=cmake_src_versions,
) )
) )