Update CMake versions (#605)
This commit is contained in:
parent
619f3881db
commit
1f48d7756c
|
@ -455,7 +455,7 @@ Call this function from the WORKSPACE file to initialize rules_foreign_cc de
|
|||
| :------------- | :------------- | :------------- |
|
||||
| <a id="rules_foreign_cc_dependencies-native_tools_toolchains"></a>native_tools_toolchains | pass the toolchains for toolchain types '@rules_foreign_cc//toolchains:cmake_toolchain' and '@rules_foreign_cc//toolchains:ninja_toolchain' with the needed platform constraints. If you do not pass anything, registered default toolchains will be selected (see below). | <code>[]</code> |
|
||||
| <a id="rules_foreign_cc_dependencies-register_default_tools"></a>register_default_tools | If True, the cmake and ninja toolchains, calling corresponding preinstalled binaries by name (cmake, ninja) will be registered after 'native_tools_toolchains' without any platform constraints. The default is True. | <code>True</code> |
|
||||
| <a id="rules_foreign_cc_dependencies-cmake_version"></a>cmake_version | The target version of the cmake toolchain if <code>register_default_tools</code> or <code>register_built_tools</code> is set to <code>True</code>. | <code>"3.20.0"</code> |
|
||||
| <a id="rules_foreign_cc_dependencies-cmake_version"></a>cmake_version | The target version of the cmake toolchain if <code>register_default_tools</code> or <code>register_built_tools</code> is set to <code>True</code>. | <code>"3.20.1"</code> |
|
||||
| <a id="rules_foreign_cc_dependencies-make_version"></a>make_version | The target version of the default make toolchain if <code>register_built_tools</code> is set to <code>True</code>. | <code>"4.3"</code> |
|
||||
| <a id="rules_foreign_cc_dependencies-ninja_version"></a>ninja_version | The target version of the ninja toolchain if <code>register_default_tools</code> or <code>register_built_tools</code> is set to <code>True</code>. | <code>"1.10.2"</code> |
|
||||
| <a id="rules_foreign_cc_dependencies-register_preinstalled_tools"></a>register_preinstalled_tools | If true, toolchains will be registered for the native built tools installed on the exec host | <code>True</code> |
|
||||
|
|
|
@ -12,7 +12,7 @@ load("//toolchains:toolchains.bzl", "built_toolchains", "prebuilt_toolchains", "
|
|||
def rules_foreign_cc_dependencies(
|
||||
native_tools_toolchains = [],
|
||||
register_default_tools = True,
|
||||
cmake_version = "3.20.0",
|
||||
cmake_version = "3.20.1",
|
||||
make_version = "4.3",
|
||||
ninja_version = "1.10.2",
|
||||
register_preinstalled_tools = True,
|
||||
|
|
|
@ -25,6 +25,18 @@ def _cmake_toolchain(version):
|
|||
native.register_toolchains(
|
||||
"@rules_foreign_cc//toolchains:built_cmake_toolchain",
|
||||
)
|
||||
if "3.20.1" == version:
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "cmake_src",
|
||||
build_file_content = _ALL_CONTENT,
|
||||
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,
|
||||
|
|
|
@ -65,6 +65,110 @@ def prebuilt_toolchains(cmake_version, ninja_version):
|
|||
_make_toolchains()
|
||||
|
||||
def _cmake_toolchains(version):
|
||||
if "3.20.1" == version:
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "cmake-3.20.1-linux-aarch64",
|
||||
urls = [
|
||||
"https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-linux-aarch64.tar.gz",
|
||||
],
|
||||
sha256 = "5ad1f8139498a1956df369c401658ec787f63c8cb4e9759f2edaa51626a86512",
|
||||
strip_prefix = "cmake-3.20.1-linux-aarch64",
|
||||
build_file_content = _CMAKE_BUILD_FILE.format(
|
||||
bin = "cmake",
|
||||
),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "cmake-3.20.1-linux-x86_64",
|
||||
urls = [
|
||||
"https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-linux-x86_64.tar.gz",
|
||||
],
|
||||
sha256 = "b8c141bd7a6d335600ab0a8a35e75af79f95b837f736456b5532f4d717f20a09",
|
||||
strip_prefix = "cmake-3.20.1-linux-x86_64",
|
||||
build_file_content = _CMAKE_BUILD_FILE.format(
|
||||
bin = "cmake",
|
||||
),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "cmake-3.20.1-macos-universal",
|
||||
urls = [
|
||||
"https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-macos-universal.tar.gz",
|
||||
],
|
||||
sha256 = "44143d47fdcc7fc3042576c6a8b661e3b65a18143666f74d6e8d93ca3ab5cd95",
|
||||
strip_prefix = "cmake-3.20.1-macos-universal/CMake.app/Contents",
|
||||
build_file_content = _CMAKE_BUILD_FILE.format(
|
||||
bin = "cmake",
|
||||
),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "cmake-3.20.1-windows-i386",
|
||||
urls = [
|
||||
"https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-windows-i386.zip",
|
||||
],
|
||||
sha256 = "650026534e66dabe0ed6be3422e86fabce5fa86d43927171ea8b8dfd0877fc9d",
|
||||
strip_prefix = "cmake-3.20.1-windows-i386",
|
||||
build_file_content = _CMAKE_BUILD_FILE.format(
|
||||
bin = "cmake.exe",
|
||||
),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "cmake-3.20.1-windows-x86_64",
|
||||
urls = [
|
||||
"https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-windows-x86_64.zip",
|
||||
],
|
||||
sha256 = "9ed05401722f60e006420f5974c164795b321f0d8d8e7f2c0ed1180b5382201b",
|
||||
strip_prefix = "cmake-3.20.1-windows-x86_64",
|
||||
build_file_content = _CMAKE_BUILD_FILE.format(
|
||||
bin = "cmake.exe",
|
||||
),
|
||||
)
|
||||
|
||||
# buildifier: leave-alone
|
||||
maybe(
|
||||
prebuilt_toolchains_repository,
|
||||
name = "cmake_3.20.1_toolchains",
|
||||
repos = {
|
||||
"cmake-3.20.1-linux-aarch64": [
|
||||
"@platforms//cpu:aarch64",
|
||||
"@platforms//os:linux",
|
||||
],
|
||||
"cmake-3.20.1-linux-x86_64": [
|
||||
"@platforms//cpu:x86_64",
|
||||
"@platforms//os:linux",
|
||||
],
|
||||
"cmake-3.20.1-macos-universal": [
|
||||
"@platforms//os:macos",
|
||||
],
|
||||
"cmake-3.20.1-windows-i386": [
|
||||
"@platforms//cpu:x86_32",
|
||||
"@platforms//os:windows",
|
||||
],
|
||||
"cmake-3.20.1-windows-x86_64": [
|
||||
"@platforms//cpu:x86_64",
|
||||
"@platforms//os:windows",
|
||||
],
|
||||
},
|
||||
tool = "cmake",
|
||||
)
|
||||
|
||||
native.register_toolchains(
|
||||
"@cmake_3.20.1_toolchains//:cmake-3.20.1-linux-aarch64_toolchain",
|
||||
"@cmake_3.20.1_toolchains//:cmake-3.20.1-linux-x86_64_toolchain",
|
||||
"@cmake_3.20.1_toolchains//:cmake-3.20.1-macos-universal_toolchain",
|
||||
"@cmake_3.20.1_toolchains//:cmake-3.20.1-windows-i386_toolchain",
|
||||
"@cmake_3.20.1_toolchains//:cmake-3.20.1-windows-x86_64_toolchain",
|
||||
)
|
||||
|
||||
return
|
||||
|
||||
if "3.20.0" == version:
|
||||
maybe(
|
||||
http_archive,
|
||||
|
@ -169,6 +273,110 @@ def _cmake_toolchains(version):
|
|||
|
||||
return
|
||||
|
||||
if "3.19.8" == version:
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "cmake-3.19.8-Linux-aarch64",
|
||||
urls = [
|
||||
"https://github.com/Kitware/CMake/releases/download/v3.19.8/cmake-3.19.8-Linux-aarch64.tar.gz",
|
||||
],
|
||||
sha256 = "807f5afb2a560e00af9640e496d5673afefc2888bf0ed076412884a5ebb547a1",
|
||||
strip_prefix = "cmake-3.19.8-Linux-aarch64",
|
||||
build_file_content = _CMAKE_BUILD_FILE.format(
|
||||
bin = "cmake",
|
||||
),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "cmake-3.19.8-Linux-x86_64",
|
||||
urls = [
|
||||
"https://github.com/Kitware/CMake/releases/download/v3.19.8/cmake-3.19.8-Linux-x86_64.tar.gz",
|
||||
],
|
||||
sha256 = "db0d7d225150dd6e08ce54995e671f9b4801b8e93e22df1eef52339f6bbbecd9",
|
||||
strip_prefix = "cmake-3.19.8-Linux-x86_64",
|
||||
build_file_content = _CMAKE_BUILD_FILE.format(
|
||||
bin = "cmake",
|
||||
),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "cmake-3.19.8-macos-universal",
|
||||
urls = [
|
||||
"https://github.com/Kitware/CMake/releases/download/v3.19.8/cmake-3.19.8-macos-universal.tar.gz",
|
||||
],
|
||||
sha256 = "0976d23d982af05dcbfb3aa34fcb62ead43bea27f0e3bb95222f2a78161423f2",
|
||||
strip_prefix = "cmake-3.19.8-macos-universal/CMake.app/Contents",
|
||||
build_file_content = _CMAKE_BUILD_FILE.format(
|
||||
bin = "cmake",
|
||||
),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "cmake-3.19.8-win32-x86",
|
||||
urls = [
|
||||
"https://github.com/Kitware/CMake/releases/download/v3.19.8/cmake-3.19.8-win32-x86.zip",
|
||||
],
|
||||
sha256 = "f82bbfc56fe1c9f9f137991f742d09b79ec31168ef99eb67f8f4fa92276d9efb",
|
||||
strip_prefix = "cmake-3.19.8-win32-x86",
|
||||
build_file_content = _CMAKE_BUILD_FILE.format(
|
||||
bin = "cmake.exe",
|
||||
),
|
||||
)
|
||||
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "cmake-3.19.8-win64-x64",
|
||||
urls = [
|
||||
"https://github.com/Kitware/CMake/releases/download/v3.19.8/cmake-3.19.8-win64-x64.zip",
|
||||
],
|
||||
sha256 = "2a30877a3d6b50da305b289f4d1c03befdfaeb2edba02a563c681e883d810380",
|
||||
strip_prefix = "cmake-3.19.8-win64-x64",
|
||||
build_file_content = _CMAKE_BUILD_FILE.format(
|
||||
bin = "cmake.exe",
|
||||
),
|
||||
)
|
||||
|
||||
# buildifier: leave-alone
|
||||
maybe(
|
||||
prebuilt_toolchains_repository,
|
||||
name = "cmake_3.19.8_toolchains",
|
||||
repos = {
|
||||
"cmake-3.19.8-Linux-aarch64": [
|
||||
"@platforms//cpu:aarch64",
|
||||
"@platforms//os:linux",
|
||||
],
|
||||
"cmake-3.19.8-Linux-x86_64": [
|
||||
"@platforms//cpu:x86_64",
|
||||
"@platforms//os:linux",
|
||||
],
|
||||
"cmake-3.19.8-macos-universal": [
|
||||
"@platforms//os:macos",
|
||||
],
|
||||
"cmake-3.19.8-win32-x86": [
|
||||
"@platforms//cpu:x86_32",
|
||||
"@platforms//os:windows",
|
||||
],
|
||||
"cmake-3.19.8-win64-x64": [
|
||||
"@platforms//cpu:x86_64",
|
||||
"@platforms//os:windows",
|
||||
],
|
||||
},
|
||||
tool = "cmake",
|
||||
)
|
||||
|
||||
native.register_toolchains(
|
||||
"@cmake_3.19.8_toolchains//:cmake-3.19.8-Linux-aarch64_toolchain",
|
||||
"@cmake_3.19.8_toolchains//:cmake-3.19.8-Linux-x86_64_toolchain",
|
||||
"@cmake_3.19.8_toolchains//:cmake-3.19.8-macos-universal_toolchain",
|
||||
"@cmake_3.19.8_toolchains//:cmake-3.19.8-win32-x86_toolchain",
|
||||
"@cmake_3.19.8_toolchains//:cmake-3.19.8-win64-x64_toolchain",
|
||||
)
|
||||
|
||||
return
|
||||
|
||||
if "3.19.7" == version:
|
||||
maybe(
|
||||
http_archive,
|
||||
|
|
|
@ -11,7 +11,9 @@ 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.20.1",
|
||||
"3.20.0",
|
||||
"3.19.8",
|
||||
"3.19.7",
|
||||
"3.19.6",
|
||||
"3.19.5",
|
||||
|
|
Loading…
Reference in New Issue