diff --git a/foreign_cc/repositories.bzl b/foreign_cc/repositories.bzl index c2904fb1..8e5f54b1 100644 --- a/foreign_cc/repositories.bzl +++ b/foreign_cc/repositories.bzl @@ -11,7 +11,7 @@ def rules_foreign_cc_dependencies( register_default_tools = True, cmake_version = "3.23.2", make_version = "4.4", - ninja_version = "1.11.0", + ninja_version = "1.11.1", pkgconfig_version = "0.29.2", register_preinstalled_tools = True, register_built_tools = True, diff --git a/toolchains/built_toolchains.bzl b/toolchains/built_toolchains.bzl index c32fc5f6..dd2e64d3 100644 --- a/toolchains/built_toolchains.bzl +++ b/toolchains/built_toolchains.bzl @@ -5,6 +5,7 @@ from source load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") +load("@rules_foreign_cc//toolchains:cmake_versions.bzl", _CMAKE_SRCS = "CMAKE_SRCS") _ALL_CONTENT = """\ 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 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 - 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)) def _make_toolchain(version, register_toolchains): @@ -470,6 +104,18 @@ def _ninja_toolchain(version, register_toolchains): native.register_toolchains( "@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": maybe( http_archive, diff --git a/toolchains/cmake_versions.bzl b/toolchains/cmake_versions.bzl new file mode 100644 index 00000000..f53c8d51 --- /dev/null +++ b/toolchains/cmake_versions.bzl @@ -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", + ], +} diff --git a/toolchains/prebuilt_toolchains.bzl b/toolchains/prebuilt_toolchains.bzl index 547468ef..1e65647d 100644 --- a/toolchains/prebuilt_toolchains.bzl +++ b/toolchains/prebuilt_toolchains.bzl @@ -64,9 +64,1108 @@ def prebuilt_toolchains(cmake_version, ninja_version, register_toolchains): """ _cmake_toolchains(cmake_version, register_toolchains) _ninja_toolchains(ninja_version, register_toolchains) - _make_toolchains(register_toolchains) def _cmake_toolchains(version, register_toolchains): + if "3.25.2" == version: + maybe( + http_archive, + name = "cmake-3.25.2-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-linux-aarch64.tar.gz", + ], + sha256 = "9216ecf0449ade700e66e0def11eeaebf9fa7d4428c02f49cb59f11418d3f8a5", + strip_prefix = "cmake-3.25.2-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.25.2-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-linux-x86_64.tar.gz", + ], + sha256 = "783da74f132fd1fea91b8236d267efa4df5b91c5eec1dea0a87f0cf233748d99", + strip_prefix = "cmake-3.25.2-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.25.2-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-macos-universal.tar.gz", + ], + sha256 = "0b5def3f77617b2ce0ec6701f96e4123a7b14bd0b8a5674ab0556c364ff7cb52", + strip_prefix = "cmake-3.25.2-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.25.2-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-windows-i386.zip", + ], + sha256 = "833abaa21bb673491def058cc38834fbd606d525ab271f37a3b8a3aed586c4a0", + strip_prefix = "cmake-3.25.2-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.25.2-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-windows-x86_64.zip", + ], + sha256 = "0db9d3cebf894f64751141253fb9d9e310f325e2e03044f61249a359d6adf301", + strip_prefix = "cmake-3.25.2-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.25.2_toolchains", + repos = { + "cmake-3.25.2-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.25.2-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.25.2-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.25.2-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.25.2-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.25.2_toolchains//:cmake-3.25.2-linux-aarch64_toolchain", + "@cmake_3.25.2_toolchains//:cmake-3.25.2-linux-x86_64_toolchain", + "@cmake_3.25.2_toolchains//:cmake-3.25.2-macos-universal_toolchain", + "@cmake_3.25.2_toolchains//:cmake-3.25.2-windows-i386_toolchain", + "@cmake_3.25.2_toolchains//:cmake-3.25.2-windows-x86_64_toolchain", + ) + + return + + if "3.25.1" == version: + maybe( + http_archive, + name = "cmake-3.25.1-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-linux-aarch64.tar.gz", + ], + sha256 = "b1c9b85e0ee4db0eb335e8d8868b4527224db402d404119a4b1a5e081a89445f", + strip_prefix = "cmake-3.25.1-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.25.1-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-linux-x86_64.tar.gz", + ], + sha256 = "3a5008b613eeb0724edeb3c15bf91d6ce518eb8eebc6ee758f89a0f4ff5d1fd6", + strip_prefix = "cmake-3.25.1-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.25.1-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-macos-universal.tar.gz", + ], + sha256 = "e95e75ea506189785355a7e8dd86b059780a5613b9e62ab6e7419d6bfba3510b", + strip_prefix = "cmake-3.25.1-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.25.1-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-windows-i386.zip", + ], + sha256 = "6f661cd493bc868aa10c8ae3ac1e88caabec45ce8b3f035d5fd165ab9a08bc0c", + strip_prefix = "cmake-3.25.1-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.25.1-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-windows-x86_64.zip", + ], + sha256 = "d93958d87cc9b91983489f0b37a268b03a3c891894d11f5437fa2a5ce94aab24", + strip_prefix = "cmake-3.25.1-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.25.1_toolchains", + repos = { + "cmake-3.25.1-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.25.1-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.25.1-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.25.1-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.25.1-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.25.1_toolchains//:cmake-3.25.1-linux-aarch64_toolchain", + "@cmake_3.25.1_toolchains//:cmake-3.25.1-linux-x86_64_toolchain", + "@cmake_3.25.1_toolchains//:cmake-3.25.1-macos-universal_toolchain", + "@cmake_3.25.1_toolchains//:cmake-3.25.1-windows-i386_toolchain", + "@cmake_3.25.1_toolchains//:cmake-3.25.1-windows-x86_64_toolchain", + ) + + return + + if "3.25.0" == version: + maybe( + http_archive, + name = "cmake-3.25.0-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0-linux-aarch64.tar.gz", + ], + sha256 = "27da36d6debe9b30f5c498554ae40cd621a55736f5f2ae2618ed95722a59965a", + strip_prefix = "cmake-3.25.0-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.25.0-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0-linux-x86_64.tar.gz", + ], + sha256 = "ac634d6f0a81d7089adc7be5acff66a6bee3b08615f9a947858ce92a9ef59c8b", + strip_prefix = "cmake-3.25.0-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.25.0-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0-macos-universal.tar.gz", + ], + sha256 = "c088e761534a2078cd9d0581d39f02d3f9ed05302e33135b55c6d619b263b4c3", + strip_prefix = "cmake-3.25.0-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.25.0-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0-windows-i386.zip", + ], + sha256 = "ddd115257a19ff3dd18fc63f32a00ae742f8b62d2e39bc354629903512f99783", + strip_prefix = "cmake-3.25.0-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.25.0-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0-windows-x86_64.zip", + ], + sha256 = "b46030c10cab1170355952f9ac59f7e6dabc248070fc53f15dff11d4ed2910f8", + strip_prefix = "cmake-3.25.0-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.25.0_toolchains", + repos = { + "cmake-3.25.0-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.25.0-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.25.0-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.25.0-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.25.0-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.25.0_toolchains//:cmake-3.25.0-linux-aarch64_toolchain", + "@cmake_3.25.0_toolchains//:cmake-3.25.0-linux-x86_64_toolchain", + "@cmake_3.25.0_toolchains//:cmake-3.25.0-macos-universal_toolchain", + "@cmake_3.25.0_toolchains//:cmake-3.25.0-windows-i386_toolchain", + "@cmake_3.25.0_toolchains//:cmake-3.25.0-windows-x86_64_toolchain", + ) + + return + + if "3.24.3" == version: + maybe( + http_archive, + name = "cmake-3.24.3-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.3/cmake-3.24.3-linux-aarch64.tar.gz", + ], + sha256 = "00d6911b886f394b3b7fec8b1fa010112c98251bb8d95cedecaacc4fe7961a9a", + strip_prefix = "cmake-3.24.3-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.3-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.3/cmake-3.24.3-linux-x86_64.tar.gz", + ], + sha256 = "8e3d048c7fb26767b00db6a55025aa380d91f45d8f3749e9b9961ef25744b102", + strip_prefix = "cmake-3.24.3-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.3-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.3/cmake-3.24.3-macos-universal.tar.gz", + ], + sha256 = "f1658e4a9259adc74225be0dcd514b8d9bae3314e7f13dee03b6a25833ab7823", + strip_prefix = "cmake-3.24.3-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.3-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.3/cmake-3.24.3-windows-i386.zip", + ], + sha256 = "f5a1a1314e539f04a5466a8b5e11d831507a9c2fc233f6dc976b6e304bd1e2ae", + strip_prefix = "cmake-3.24.3-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.3-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.3/cmake-3.24.3-windows-x86_64.zip", + ], + sha256 = "86c605507e4175d1e1cd2fd9098d6a5b6bf6ff7f885f4b75ddfc9ac3dc1d4452", + strip_prefix = "cmake-3.24.3-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.24.3_toolchains", + repos = { + "cmake-3.24.3-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.24.3-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.24.3-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.24.3-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.24.3-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.24.3_toolchains//:cmake-3.24.3-linux-aarch64_toolchain", + "@cmake_3.24.3_toolchains//:cmake-3.24.3-linux-x86_64_toolchain", + "@cmake_3.24.3_toolchains//:cmake-3.24.3-macos-universal_toolchain", + "@cmake_3.24.3_toolchains//:cmake-3.24.3-windows-i386_toolchain", + "@cmake_3.24.3_toolchains//:cmake-3.24.3-windows-x86_64_toolchain", + ) + + return + + if "3.24.2" == version: + maybe( + http_archive, + name = "cmake-3.24.2-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-aarch64.tar.gz", + ], + sha256 = "5f1c0d49bac89915b5c68811c2430e5de6c8e606785b9f2919eabee86c2f12b4", + strip_prefix = "cmake-3.24.2-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.2-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-x86_64.tar.gz", + ], + sha256 = "71a776b6a08135092b5beb00a603b60ca39f8231c01a0356e205e0b4631747d9", + strip_prefix = "cmake-3.24.2-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.2-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-macos-universal.tar.gz", + ], + sha256 = "efb11a78c064dd7c54a50b8da247254d252112c402c6e48cb7db3f9c84a4e5ad", + strip_prefix = "cmake-3.24.2-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.2-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-windows-i386.zip", + ], + sha256 = "52f174dc7f52a9c496c7a49ee35456466c07c8ce29aa2092f4b4536ce5d7ed57", + strip_prefix = "cmake-3.24.2-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.2-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-windows-x86_64.zip", + ], + sha256 = "6af30354eecbb7113b0f0142d13c03d21abbc9f4dbdcddaf88df1f9ca1bc4d6f", + strip_prefix = "cmake-3.24.2-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.24.2_toolchains", + repos = { + "cmake-3.24.2-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.24.2-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.24.2-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.24.2-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.24.2-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.24.2_toolchains//:cmake-3.24.2-linux-aarch64_toolchain", + "@cmake_3.24.2_toolchains//:cmake-3.24.2-linux-x86_64_toolchain", + "@cmake_3.24.2_toolchains//:cmake-3.24.2-macos-universal_toolchain", + "@cmake_3.24.2_toolchains//:cmake-3.24.2-windows-i386_toolchain", + "@cmake_3.24.2_toolchains//:cmake-3.24.2-windows-x86_64_toolchain", + ) + + return + + if "3.24.1" == version: + maybe( + http_archive, + name = "cmake-3.24.1-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-linux-aarch64.tar.gz", + ], + sha256 = "d50c40135df667ed659f8e4eb7cf7d53421250304f7b3e1a70af9cf3d0f2ab18", + strip_prefix = "cmake-3.24.1-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.1-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-linux-x86_64.tar.gz", + ], + sha256 = "827bf068cfaa23a9fb95f990c9f8a7ed8f2caeb3af62b5c0a2fed7a8dd6dde3e", + strip_prefix = "cmake-3.24.1-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.1-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-macos-universal.tar.gz", + ], + sha256 = "71bb8db69826d74c395a3c3bbf8b773dbe9f54a2c7331266ba70da303e9c97a1", + strip_prefix = "cmake-3.24.1-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.1-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-windows-i386.zip", + ], + sha256 = "a0b894e2a814d2353f1e581eb6ca3c878a39c071624495729dbcf9978e1579f2", + strip_prefix = "cmake-3.24.1-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.1-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-windows-x86_64.zip", + ], + sha256 = "c1b17431a16337d517f7ba78c7067b6f143a12686cb8087f3dd32f3fa45f5aae", + strip_prefix = "cmake-3.24.1-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.24.1_toolchains", + repos = { + "cmake-3.24.1-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.24.1-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.24.1-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.24.1-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.24.1-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.24.1_toolchains//:cmake-3.24.1-linux-aarch64_toolchain", + "@cmake_3.24.1_toolchains//:cmake-3.24.1-linux-x86_64_toolchain", + "@cmake_3.24.1_toolchains//:cmake-3.24.1-macos-universal_toolchain", + "@cmake_3.24.1_toolchains//:cmake-3.24.1-windows-i386_toolchain", + "@cmake_3.24.1_toolchains//:cmake-3.24.1-windows-x86_64_toolchain", + ) + + return + + if "3.24.0" == version: + maybe( + http_archive, + name = "cmake-3.24.0-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-linux-aarch64.tar.gz", + ], + sha256 = "50c3b8e9d3a3cde850dd1ea143df9d1ae546cbc5e74dc6d223eefc1979189651", + strip_prefix = "cmake-3.24.0-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.0-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-linux-x86_64.tar.gz", + ], + sha256 = "726f88e6598523911e4bce9b059dc20b851aa77f97e4cc5573f4e42775a5c16f", + strip_prefix = "cmake-3.24.0-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.0-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-macos-universal.tar.gz", + ], + sha256 = "3e0cca74a56d9027dabb845a5a26e42ef8e8b33beb1655d6a724187a345145e4", + strip_prefix = "cmake-3.24.0-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.0-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-windows-i386.zip", + ], + sha256 = "5bf55ba9840c668ae3027d02c9178a0e09e034e536cf04455fb7593111bc42c4", + strip_prefix = "cmake-3.24.0-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.24.0-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-windows-x86_64.zip", + ], + sha256 = "b1ad8c2dbf0778e3efcc9fd61cd4a962e5c1af40aabdebee3d5074bcff2e103c", + strip_prefix = "cmake-3.24.0-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.24.0_toolchains", + repos = { + "cmake-3.24.0-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.24.0-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.24.0-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.24.0-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.24.0-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.24.0_toolchains//:cmake-3.24.0-linux-aarch64_toolchain", + "@cmake_3.24.0_toolchains//:cmake-3.24.0-linux-x86_64_toolchain", + "@cmake_3.24.0_toolchains//:cmake-3.24.0-macos-universal_toolchain", + "@cmake_3.24.0_toolchains//:cmake-3.24.0-windows-i386_toolchain", + "@cmake_3.24.0_toolchains//:cmake-3.24.0-windows-x86_64_toolchain", + ) + + return + + if "3.23.5" == version: + maybe( + http_archive, + name = "cmake-3.23.5-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.5/cmake-3.23.5-linux-aarch64.tar.gz", + ], + sha256 = "dcf25a81de6bd4e646389a0635b050ed04d0f27e4f07ae22d975391f38f3c4b8", + strip_prefix = "cmake-3.23.5-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.23.5-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.5/cmake-3.23.5-linux-x86_64.tar.gz", + ], + sha256 = "bbd7ad93d2a14ed3608021a9466ae63db76a24efd1fae7a5f7798c1de7ab9344", + strip_prefix = "cmake-3.23.5-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.23.5-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.5/cmake-3.23.5-macos-universal.tar.gz", + ], + sha256 = "245f07d6e346d2b3fdda600b3705579cf956fdd82ac4f4326b96e7d2c43a9312", + strip_prefix = "cmake-3.23.5-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.23.5-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.5/cmake-3.23.5-windows-i386.zip", + ], + sha256 = "ac454a9bcdfad932c8658c864c239506b2b2ebaf88b75ff96bc27a672f8ce7f9", + strip_prefix = "cmake-3.23.5-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.23.5-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.5/cmake-3.23.5-windows-x86_64.zip", + ], + sha256 = "51c75f93ebfe295701df205e5e78808b1e707996b26b5c26c3f680ab7b543881", + strip_prefix = "cmake-3.23.5-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.23.5_toolchains", + repos = { + "cmake-3.23.5-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.23.5-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.23.5-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.23.5-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.23.5-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.23.5_toolchains//:cmake-3.23.5-linux-aarch64_toolchain", + "@cmake_3.23.5_toolchains//:cmake-3.23.5-linux-x86_64_toolchain", + "@cmake_3.23.5_toolchains//:cmake-3.23.5-macos-universal_toolchain", + "@cmake_3.23.5_toolchains//:cmake-3.23.5-windows-i386_toolchain", + "@cmake_3.23.5_toolchains//:cmake-3.23.5-windows-x86_64_toolchain", + ) + + return + + if "3.23.4" == version: + maybe( + http_archive, + name = "cmake-3.23.4-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.4/cmake-3.23.4-linux-aarch64.tar.gz", + ], + sha256 = "53fbeda3f597a49c9d3ca8c31f1fd849790994ca607e8739d0ee949c81ae1687", + strip_prefix = "cmake-3.23.4-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.23.4-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.4/cmake-3.23.4-linux-x86_64.tar.gz", + ], + sha256 = "3fbcbff85043d63a8a83c8bdf8bd5b1b2fd5768f922de7dc4443de7805a2670d", + strip_prefix = "cmake-3.23.4-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.23.4-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.4/cmake-3.23.4-macos-universal.tar.gz", + ], + sha256 = "98cac043cdf321caa4fd07f27da3316db6c8bc48c39997bf78e27e5c46c4eb68", + strip_prefix = "cmake-3.23.4-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.23.4-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.4/cmake-3.23.4-windows-i386.zip", + ], + sha256 = "6a6443c29dcd301be368015dffea8354fd21ab61a49434e8b9df7e2ce609206a", + strip_prefix = "cmake-3.23.4-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.23.4-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.4/cmake-3.23.4-windows-x86_64.zip", + ], + sha256 = "df15113aaab9e5f8cac254e02cf23f70d02407c9bf2983c82a9fe0d35bd20682", + strip_prefix = "cmake-3.23.4-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.23.4_toolchains", + repos = { + "cmake-3.23.4-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.23.4-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.23.4-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.23.4-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.23.4-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.23.4_toolchains//:cmake-3.23.4-linux-aarch64_toolchain", + "@cmake_3.23.4_toolchains//:cmake-3.23.4-linux-x86_64_toolchain", + "@cmake_3.23.4_toolchains//:cmake-3.23.4-macos-universal_toolchain", + "@cmake_3.23.4_toolchains//:cmake-3.23.4-windows-i386_toolchain", + "@cmake_3.23.4_toolchains//:cmake-3.23.4-windows-x86_64_toolchain", + ) + + return + + if "3.23.3" == version: + maybe( + http_archive, + name = "cmake-3.23.3-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.3/cmake-3.23.3-linux-aarch64.tar.gz", + ], + sha256 = "5214d483fbe7c48c7fbe67264422df41e1d490fc00c779c61f5ec85fbbf3e8bd", + strip_prefix = "cmake-3.23.3-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.23.3-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.3/cmake-3.23.3-linux-x86_64.tar.gz", + ], + sha256 = "39e1c2eccda989b0d000dc5f4ee2cb031bdda799163780d855acc0bd9eda9d92", + strip_prefix = "cmake-3.23.3-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.23.3-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.3/cmake-3.23.3-macos-universal.tar.gz", + ], + sha256 = "45cda7b87cad41ac407fc150e4682b85c3eb45b1977d8e89319cb3a9a6f341f3", + strip_prefix = "cmake-3.23.3-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.23.3-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.3/cmake-3.23.3-windows-i386.zip", + ], + sha256 = "5c6fe36122e0ba41baadd0eb80157f107d2cca39894df22e472fcced9542358d", + strip_prefix = "cmake-3.23.3-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.23.3-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.23.3/cmake-3.23.3-windows-x86_64.zip", + ], + sha256 = "b3365f30fc9fb27ffa524c2a987c34b307382930007341b39d3f0e271930d883", + strip_prefix = "cmake-3.23.3-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.23.3_toolchains", + repos = { + "cmake-3.23.3-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.23.3-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.23.3-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.23.3-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.23.3-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.23.3_toolchains//:cmake-3.23.3-linux-aarch64_toolchain", + "@cmake_3.23.3_toolchains//:cmake-3.23.3-linux-x86_64_toolchain", + "@cmake_3.23.3_toolchains//:cmake-3.23.3-macos-universal_toolchain", + "@cmake_3.23.3_toolchains//:cmake-3.23.3-windows-i386_toolchain", + "@cmake_3.23.3_toolchains//:cmake-3.23.3-windows-x86_64_toolchain", + ) + + return + if "3.23.2" == version: maybe( http_archive, @@ -287,6 +1386,226 @@ def _cmake_toolchains(version, register_toolchains): return + if "3.22.6" == version: + maybe( + http_archive, + name = "cmake-3.22.6-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.22.6/cmake-3.22.6-linux-aarch64.tar.gz", + ], + sha256 = "79be85d3e76565faacd60695cee11d030f7e7dd8691476144fa25eb93dbd0397", + strip_prefix = "cmake-3.22.6-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.22.6-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.22.6/cmake-3.22.6-linux-x86_64.tar.gz", + ], + sha256 = "09e1b34026c406c5bf4d1b053eadb3a8519cb360e37547ebf4b70ab766d94fbc", + strip_prefix = "cmake-3.22.6-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.22.6-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.22.6/cmake-3.22.6-macos-universal.tar.gz", + ], + sha256 = "b4569e10b0f86ed4fad23aae879a197de6fb14aca057bfc2e3baf236c3e876c5", + strip_prefix = "cmake-3.22.6-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.22.6-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.22.6/cmake-3.22.6-windows-i386.zip", + ], + sha256 = "058572b13af626e48cc8cba235c14491117b761354fb3c567b11c29835ff8283", + strip_prefix = "cmake-3.22.6-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.22.6-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.22.6/cmake-3.22.6-windows-x86_64.zip", + ], + sha256 = "48bcc3e71e918b72e2682f9ca9d44dd6c416379071c1ecb530d0633374f91f15", + strip_prefix = "cmake-3.22.6-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.22.6_toolchains", + repos = { + "cmake-3.22.6-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.22.6-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.22.6-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.22.6-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.22.6-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.22.6_toolchains//:cmake-3.22.6-linux-aarch64_toolchain", + "@cmake_3.22.6_toolchains//:cmake-3.22.6-linux-x86_64_toolchain", + "@cmake_3.22.6_toolchains//:cmake-3.22.6-macos-universal_toolchain", + "@cmake_3.22.6_toolchains//:cmake-3.22.6-windows-i386_toolchain", + "@cmake_3.22.6_toolchains//:cmake-3.22.6-windows-x86_64_toolchain", + ) + + return + + if "3.22.5" == version: + maybe( + http_archive, + name = "cmake-3.22.5-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.22.5/cmake-3.22.5-linux-aarch64.tar.gz", + ], + sha256 = "26bbb7c103f03b367feb718f46a09aa2d60fafb5b6993b540c28e87a771fd0d1", + strip_prefix = "cmake-3.22.5-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.22.5-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.22.5/cmake-3.22.5-linux-x86_64.tar.gz", + ], + sha256 = "5a80198423f731ea12ade14b2e44613a4741a9485c8a056f1be93ab468dd1955", + strip_prefix = "cmake-3.22.5-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.22.5-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.22.5/cmake-3.22.5-macos-universal.tar.gz", + ], + sha256 = "61bf37055959e75f8055fd4fc17ab458fddbf0b7278df26dc93cb835c57f3bf2", + strip_prefix = "cmake-3.22.5-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.22.5-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.22.5/cmake-3.22.5-windows-i386.zip", + ], + sha256 = "2948fbf6fa8a52645e297be6fc3228da1a221d658b1041ce368ecef3a4e53de7", + strip_prefix = "cmake-3.22.5-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.22.5-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.22.5/cmake-3.22.5-windows-x86_64.zip", + ], + sha256 = "777378894962c77d1ea550e42c81d250f38b51e3f82bbd631f02b328bfc430a5", + strip_prefix = "cmake-3.22.5-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.22.5_toolchains", + repos = { + "cmake-3.22.5-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.22.5-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.22.5-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.22.5-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.22.5-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.22.5_toolchains//:cmake-3.22.5-linux-aarch64_toolchain", + "@cmake_3.22.5_toolchains//:cmake-3.22.5-linux-x86_64_toolchain", + "@cmake_3.22.5_toolchains//:cmake-3.22.5-macos-universal_toolchain", + "@cmake_3.22.5_toolchains//:cmake-3.22.5-windows-i386_toolchain", + "@cmake_3.22.5_toolchains//:cmake-3.22.5-windows-x86_64_toolchain", + ) + + return + if "3.22.4" == version: maybe( http_archive, @@ -837,6 +2156,116 @@ def _cmake_toolchains(version, register_toolchains): return + if "3.21.6" == version: + maybe( + http_archive, + name = "cmake-3.21.6-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.21.6/cmake-3.21.6-linux-aarch64.tar.gz", + ], + sha256 = "e3648e2c12157bf2c5b695a84499f3639fc87ea61558cc3b98e2e78e3a21b546", + strip_prefix = "cmake-3.21.6-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.21.6-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.21.6/cmake-3.21.6-linux-x86_64.tar.gz", + ], + sha256 = "bf457b4432c9b81877b299ade36324ba4f2429e0005e1a388aeae353c652d087", + strip_prefix = "cmake-3.21.6-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.21.6-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.21.6/cmake-3.21.6-macos-universal.tar.gz", + ], + sha256 = "0a0a68efd6a2e673e584389141b46ff398d13d7b36bd9ad2dc7f3110ebc13411", + strip_prefix = "cmake-3.21.6-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.21.6-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.21.6/cmake-3.21.6-windows-i386.zip", + ], + sha256 = "9278fd58c2a1a34e395a3faca1a943b6b6adba684350b421e76b59996edb5d2f", + strip_prefix = "cmake-3.21.6-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.21.6-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.21.6/cmake-3.21.6-windows-x86_64.zip", + ], + sha256 = "1a9dec52ce243adf5a313820ea2101bdd22c5d37b71e08962febfb10dd27ee30", + strip_prefix = "cmake-3.21.6-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.21.6_toolchains", + repos = { + "cmake-3.21.6-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.21.6-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.21.6-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.21.6-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.21.6-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.21.6_toolchains//:cmake-3.21.6-linux-aarch64_toolchain", + "@cmake_3.21.6_toolchains//:cmake-3.21.6-linux-x86_64_toolchain", + "@cmake_3.21.6_toolchains//:cmake-3.21.6-macos-universal_toolchain", + "@cmake_3.21.6_toolchains//:cmake-3.21.6-windows-i386_toolchain", + "@cmake_3.21.6_toolchains//:cmake-3.21.6-windows-x86_64_toolchain", + ) + + return + if "3.21.5" == version: maybe( http_archive, @@ -1497,6 +2926,116 @@ def _cmake_toolchains(version, register_toolchains): return + if "3.20.6" == version: + maybe( + http_archive, + name = "cmake-3.20.6-linux-aarch64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.20.6/cmake-3.20.6-linux-aarch64.tar.gz", + ], + sha256 = "9ac2035174d3c62827c85fb052372d70cf35fb565e8d47b8241fbe451c29b2f2", + strip_prefix = "cmake-3.20.6-linux-aarch64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.20.6-linux-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.20.6/cmake-3.20.6-linux-x86_64.tar.gz", + ], + sha256 = "458777097903b0f35a0452266b923f0a2f5b62fe331e636e2dcc4b636b768e36", + strip_prefix = "cmake-3.20.6-linux-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.20.6-macos-universal", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.20.6/cmake-3.20.6-macos-universal.tar.gz", + ], + sha256 = "bc75cfbcbd95851d2e712c884de80814d7a7939441612af0ae6c5ccc2d94929f", + strip_prefix = "cmake-3.20.6-macos-universal/CMake.app/Contents", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.20.6-windows-i386", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.20.6/cmake-3.20.6-windows-i386.zip", + ], + sha256 = "3166300cce9336cd6d9c468fcb8421086baf1c3f0821bddf5f37703d00adb1cd", + strip_prefix = "cmake-3.20.6-windows-i386", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + maybe( + http_archive, + name = "cmake-3.20.6-windows-x86_64", + urls = [ + "https://github.com/Kitware/CMake/releases/download/v3.20.6/cmake-3.20.6-windows-x86_64.zip", + ], + sha256 = "f240a38c964712aac474644b3ba21bdc2b4e8d5e31179f67bd2e6f45fa349419", + strip_prefix = "cmake-3.20.6-windows-x86_64", + build_file_content = _CMAKE_BUILD_FILE.format( + bin = "cmake.exe", + env = "{}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "cmake_3.20.6_toolchains", + repos = { + "cmake-3.20.6-linux-aarch64": [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ], + "cmake-3.20.6-linux-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "cmake-3.20.6-macos-universal": [ + "@platforms//os:macos", + ], + "cmake-3.20.6-windows-i386": [ + "@platforms//cpu:x86_32", + "@platforms//os:windows", + ], + "cmake-3.20.6-windows-x86_64": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "cmake", + ) + + if register_toolchains: + native.register_toolchains( + "@cmake_3.20.6_toolchains//:cmake-3.20.6-linux-aarch64_toolchain", + "@cmake_3.20.6_toolchains//:cmake-3.20.6-linux-x86_64_toolchain", + "@cmake_3.20.6_toolchains//:cmake-3.20.6-macos-universal_toolchain", + "@cmake_3.20.6_toolchains//:cmake-3.20.6-windows-i386_toolchain", + "@cmake_3.20.6_toolchains//:cmake-3.20.6-windows-x86_64_toolchain", + ) + + return + if "3.20.5" == version: maybe( http_archive, @@ -4196,6 +5735,79 @@ def _cmake_toolchains(version, register_toolchains): fail("Unsupported version: " + str(version)) def _ninja_toolchains(version, register_toolchains): + if "1.11.1" == version: + maybe( + http_archive, + name = "ninja_1.11.1_linux", + urls = [ + "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip", + ], + sha256 = "b901ba96e486dce377f9a070ed4ef3f79deb45f4ffe2938f8e7ddc69cfb3df77", + strip_prefix = "", + build_file_content = _NINJA_BUILD_FILE.format( + bin = "ninja", + env = "{\"NINJA\": \"$(execpath :ninja_bin)\"}", + ), + ) + + maybe( + http_archive, + name = "ninja_1.11.1_mac", + urls = [ + "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip", + ], + sha256 = "482ecb23c59ae3d4f158029112de172dd96bb0e97549c4b1ca32d8fad11f873e", + strip_prefix = "", + build_file_content = _NINJA_BUILD_FILE.format( + bin = "ninja", + env = "{\"NINJA\": \"$(execpath :ninja_bin)\"}", + ), + ) + + maybe( + http_archive, + name = "ninja_1.11.1_win", + urls = [ + "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip", + ], + sha256 = "524b344a1a9a55005eaf868d991e090ab8ce07fa109f1820d40e74642e289abc", + strip_prefix = "", + build_file_content = _NINJA_BUILD_FILE.format( + bin = "ninja.exe", + env = "{\"NINJA\": \"$(execpath :ninja_bin)\"}", + ), + ) + + # buildifier: leave-alone + maybe( + prebuilt_toolchains_repository, + name = "ninja_1.11.1_toolchains", + repos = { + "ninja_1.11.1_linux": [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], + "ninja_1.11.1_mac": [ + "@platforms//cpu:x86_64", + "@platforms//os:macos", + ], + "ninja_1.11.1_win": [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + ], + }, + tool = "ninja", + ) + + if register_toolchains: + native.register_toolchains( + "@ninja_1.11.1_toolchains//:ninja_1.11.1_linux_toolchain", + "@ninja_1.11.1_toolchains//:ninja_1.11.1_mac_toolchain", + "@ninja_1.11.1_toolchains//:ninja_1.11.1_win_toolchain", + ) + + return + if "1.11.0" == version: maybe( http_archive, @@ -4635,7 +6247,3 @@ def _ninja_toolchains(version, register_toolchains): return fail("Unsupported version: " + str(version)) - -def _make_toolchains(_): - # There are currently no prebuilt make binaries - pass diff --git a/toolchains/prebuilt_toolchains.py b/toolchains/prebuilt_toolchains.py index d26e8258..007315d3 100755 --- a/toolchains/prebuilt_toolchains.py +++ b/toolchains/prebuilt_toolchains.py @@ -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_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.1", + "3.22.6", + "3.22.5", "3.22.4", "3.22.3", "3.22.2", "3.22.1", "3.22.0", + "3.21.6", "3.21.5", "3.21.4", "3.21.3", "3.21.2", "3.21.1", "3.21.0", + "3.20.6", "3.20.5", "3.20.4", "3.20.3", @@ -116,6 +130,7 @@ NINJA_TARGETS = { } NINJA_VERSIONS = ( + "1.11.1", "1.11.0", "1.10.2", "1.10.1", @@ -224,18 +239,24 @@ def prebuilt_toolchains(cmake_version, ninja_version, register_toolchains): \"\"\" _cmake_toolchains(cmake_version, register_toolchains) _ninja_toolchains(ninja_version, register_toolchains) - _make_toolchains(register_toolchains) def _cmake_toolchains(version, register_toolchains): {cmake_definitions} def _ninja_toolchains(version, register_toolchains): {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: """Define a set of repositories and calls for registering `cmake` toolchains @@ -245,9 +266,10 @@ def get_cmake_definitions() -> str: """ archives = [] + cmake_src_versions = dict() for version in CMAKE_VERSIONS: - major, minor, _patch = version.split(".") + major, minor, patch = version.split(".") version_archives = [] version_toolchains = {} @@ -269,10 +291,13 @@ def get_cmake_definitions() -> str: plat_target = target break + sha256, file = line.split() + 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 - sha256, file = line.split() name = file.replace(".tar.gz", "").replace(".zip", "") 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)) - 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: @@ -460,25 +485,24 @@ def get_ninja_definitions() -> str: 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(): """The main entrypoint of the toolchains generator""" repos_bzl_file = Path(__file__).parent.absolute() / "prebuilt_toolchains.bzl" + cmake_definitions, cmake_src_versions = get_cmake_definitions() + repos_bzl_file.write_text( BZL_FILE_TEMPLATE.format( - cmake_definitions=get_cmake_definitions(), + cmake_definitions=cmake_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, ) )