From dd9f9d5371e539e5c760d5e4a524b81376f42ad1 Mon Sep 17 00:00:00 2001
From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>
Date: Mon, 25 Mar 2024 23:57:42 +0100
Subject: [PATCH] Update CMake to 3.29.0 (#37457)
---
ports/libtorch/force-cuda-include.patch | 12 ++++++++++
ports/libtorch/portfile.cmake | 1 +
ports/libtorch/vcpkg.json | 2 +-
ports/llvm/portfile.cmake | 9 +++-----
ports/llvm/vcpkg.json | 2 +-
scripts/vcpkgTools.xml | 30 ++++++++++++-------------
versions/baseline.json | 4 ++--
versions/l-/libtorch.json | 5 +++++
versions/l-/llvm.json | 5 +++++
9 files changed, 45 insertions(+), 25 deletions(-)
create mode 100644 ports/libtorch/force-cuda-include.patch
diff --git a/ports/libtorch/force-cuda-include.patch b/ports/libtorch/force-cuda-include.patch
new file mode 100644
index 0000000000..62ec1e065d
--- /dev/null
+++ b/ports/libtorch/force-cuda-include.patch
@@ -0,0 +1,12 @@
+diff --git a/cmake/public/cuda.cmake b/cmake/public/cuda.cmake
+index e8e450d36c..8ba1778b4f 100644
+--- a/cmake/public/cuda.cmake
++++ b/cmake/public/cuda.cmake
+@@ -60,6 +60,7 @@ find_package(CUDAToolkit REQUIRED)
+
+ cmake_policy(POP)
+
++set(CUDAToolkit_INCLUDE_DIR "${CUDA_INCLUDE_DIRS}")
+ if(NOT CMAKE_CUDA_COMPILER_VERSION STREQUAL CUDAToolkit_VERSION OR
+ NOT CUDA_INCLUDE_DIRS STREQUAL CUDAToolkit_INCLUDE_DIR)
+ message(FATAL_ERROR "Found two conflicting CUDA installs:\n"
diff --git a/ports/libtorch/portfile.cmake b/ports/libtorch/portfile.cmake
index a29cf08018..b0da70bb14 100644
--- a/ports/libtorch/portfile.cmake
+++ b/ports/libtorch/portfile.cmake
@@ -20,6 +20,7 @@ vcpkg_from_github(
fix-glog.patch
fix-msvc-ICE.patch
fix-calculate-minloglevel.patch
+ force-cuda-include.patch
)
file(REMOVE_RECURSE "${SOURCE_PATH}/caffe2/core/macros.h") # We must use generated header files
diff --git a/ports/libtorch/vcpkg.json b/ports/libtorch/vcpkg.json
index 2b6477f58d..0bf479b877 100644
--- a/ports/libtorch/vcpkg.json
+++ b/ports/libtorch/vcpkg.json
@@ -1,7 +1,7 @@
{
"name": "libtorch",
"version": "2.1.2",
- "port-version": 1,
+ "port-version": 2,
"description": "Tensors and Dynamic neural networks in Python with strong GPU acceleration",
"homepage": "https://pytorch.org/",
"license": null,
diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake
index 0cdc120312..41716fdcf6 100644
--- a/ports/llvm/portfile.cmake
+++ b/ports/llvm/portfile.cmake
@@ -158,17 +158,14 @@ if("mlir" IN_LIST FEATURES)
endif()
if("openmp" IN_LIST FEATURES)
list(APPEND LLVM_ENABLE_PROJECTS "openmp")
+ # Perl is required for the OpenMP run-time
+ vcpkg_find_acquire_program(PERL)
list(APPEND FEATURE_OPTIONS
-DLIBOMP_INSTALL_ALIASES=OFF
-DOPENMP_ENABLE_LIBOMPTARGET=OFF # Currently libomptarget cannot be compiled on Windows or MacOS X.
-DOPENMP_ENABLE_OMPT_TOOLS=OFF # Currently tools are not tested well on Windows or MacOS X.
+ -DPERL_EXECUTABLE=${PERL}
)
- # Perl is required for the OpenMP run-time
- vcpkg_find_acquire_program(PERL)
- get_filename_component(PERL_PATH ${PERL} DIRECTORY)
- vcpkg_add_to_path(${PERL_PATH})
- # Skip post-build check
- set(VCPKG_POLICY_SKIP_DUMPBIN_CHECKS enabled)
endif()
if("polly" IN_LIST FEATURES)
list(APPEND LLVM_ENABLE_PROJECTS "polly")
diff --git a/ports/llvm/vcpkg.json b/ports/llvm/vcpkg.json
index 1313c98ffc..dfa1805d82 100644
--- a/ports/llvm/vcpkg.json
+++ b/ports/llvm/vcpkg.json
@@ -1,7 +1,7 @@
{
"name": "llvm",
"version": "17.0.2",
- "port-version": 3,
+ "port-version": 4,
"description": "The LLVM Compiler Infrastructure.",
"homepage": "https://llvm.org",
"license": "Apache-2.0",
diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml
index a716285856..0f1119c727 100644
--- a/scripts/vcpkgTools.xml
+++ b/scripts/vcpkgTools.xml
@@ -15,25 +15,25 @@
python-3.11.8.nupkg.zip
- 3.27.1
- cmake-3.27.1-windows-i386/bin/cmake.exe
- https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-windows-i386.zip
- a847f636fb27ba41ba9e6eaafa56937c614bcb39c6d0c9723241c229a9b0a77b4d00ebee88639561035d43f9aa64895f387eab56c628990c01191da57839cda0
- cmake-3.27.1-windows-i386.zip
+ 3.29.0
+ cmake-3.29.0-windows-i386/bin/cmake.exe
+ https://github.com/Kitware/CMake/releases/download/v3.29.0/cmake-3.29.0-windows-i386.zip
+ 70cdd5e13ac40cd1a1e2faf0cb0c3e937734c70751bf804af999bcf01b562e34b9f4fbe7da160604278d7cea7cf8676190013ae9b50f198275da2b78d0e3da64
+ cmake-3.29.0-windows-i386.zip
- 3.27.1
- cmake-3.27.1-macos-universal/CMake.app/Contents/bin/cmake
- https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-macos-universal.tar.gz
- 78e639b93786eb994bdbc6263afc48267d42d9305c1cb1cb9482adf012e7b4f45934e744a98eaf93d8361f154e642cada13398cca064c1700f009a7795746fe7
- cmake-3.27.1-macos-universal.tar.gz
+ 3.29.0
+ cmake-3.29.0-macos-universal/CMake.app/Contents/bin/cmake
+ https://github.com/Kitware/CMake/releases/download/v3.29.0/cmake-3.29.0-macos-universal.tar.gz
+ 0d4c6958ce88bd2ebbb3f3a1e6c9cf4f67017c195009b43bb2418a1b4f1068ab750c781a6eb6f43531a8423c8518957312dbf9234e1a8a5e32a350e775c884eb
+ cmake-3.29.0-macos-universal.tar.gz
- 3.27.1
- cmake-3.27.1-linux-x86_64/bin/cmake
- https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-linux-x86_64.tar.gz
- 192374a68e2971f04974a194645726196d9b8ee7abd650d1e6f65f7aa2ccc9b186c3edb473bb4958c764532edcdd42f4182ee1fcb86b17d78b0bcd6305ce3df1
- cmake-3.27.1-linux-x86_64.tar.gz
+ 3.29.0
+ cmake-3.29.0-linux-x86_64/bin/cmake
+ https://github.com/Kitware/CMake/releases/download/v3.29.0/cmake-3.29.0-linux-x86_64.tar.gz
+ 8bbcb45315f95e678fb559f11578c632028b1c69730db840db888d5e254f79b614b134b1b414a6f85d9d1e735965cb69fbfe1b692ccd6f1b9f3cee296b5d56b1
+ cmake-3.29.0-linux-x86_64.tar.gz
2.7.4
diff --git a/versions/baseline.json b/versions/baseline.json
index f5874860a1..5c6d6f9606 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -5026,7 +5026,7 @@
},
"libtorch": {
"baseline": "2.1.2",
- "port-version": 1
+ "port-version": 2
},
"libtorrent": {
"baseline": "2.0.10",
@@ -5358,7 +5358,7 @@
},
"llvm": {
"baseline": "17.0.2",
- "port-version": 3
+ "port-version": 4
},
"lmdb": {
"baseline": "0.9.31",
diff --git a/versions/l-/libtorch.json b/versions/l-/libtorch.json
index 2823d5d421..1516ddaf0d 100644
--- a/versions/l-/libtorch.json
+++ b/versions/l-/libtorch.json
@@ -1,5 +1,10 @@
{
"versions": [
+ {
+ "git-tree": "dc47289cdf640ce30bdd1039a49264c8381c2b19",
+ "version": "2.1.2",
+ "port-version": 2
+ },
{
"git-tree": "19855d043442630ea2d8060e49c66cc50c0c9d7a",
"version": "2.1.2",
diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json
index c4039fd6a5..bbbe27eabf 100644
--- a/versions/l-/llvm.json
+++ b/versions/l-/llvm.json
@@ -1,5 +1,10 @@
{
"versions": [
+ {
+ "git-tree": "9b38326a02fb44545071f8a4ee72ca3e2bc9bd8e",
+ "version": "17.0.2",
+ "port-version": 4
+ },
{
"git-tree": "ce44a7977e6376d53613ed81224eb992a0b82a98",
"version": "17.0.2",