Skip to content

Commit 9ae2e38

Browse files
authored
[build] Update minimum requirement for CMAKE (#8703)
Issue: #8673 ### Brief Summary copilot:summary This PR resolves CMake 4.0 compilation failures by standardizing the minimum required version to 3.17 across all submodules (TaichiExamples/TaichiCAPITests/TaichiCAPI/TaichiTests), ensuring compatibility with modern Linux distributions. ### Walkthrough copilot:walkthrough #### Context - CMake 4.0 dropped legacy support (including CMake 3.5) causing build failures on updated distros - Reference: [CMake Version Policy](https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html) #### Changes Made 1. Updated version requirement in: - `TaichiExamples.cmake` - `TaichiCAPITests.cmake` - `TaichiCAPI.cmake` - `TaichiTests.cmake` 2. Unified requirement to CMake 3.17 (already the de facto standard) #### Impact Analysis - No breaking changes (3.17 was already the effective minimum) - Improves forward compatibility - Affects only build system configuration #### Verification - No new tests needed (version requirement change only) - Confirmed via manual build testing #### Additional Notes - Aligns with CMake's modern version policy - Prevents future issues on rolling-release distros - Maintains backward compatibility I sincerely apologize for the additional PR noise (#8701, #8678). Due to my initial lack of Git proficiency, I inadvertently created redundant PRs while attempting to sync with upstream. This new PR (#8703) consolidates all changes with proper rebasing. Thank you for your patience, and I appreciate your guidance throughout this process.
1 parent 6f36693 commit 9ae2e38

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

cmake/TaichiCAPI.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.0)
1+
cmake_minimum_required(VERSION 3.17)
22

33
# This function creates a static target from OBJECT_TARGET, then link TARGET with the static target
44
#

cmake/TaichiCAPITests.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.0)
1+
cmake_minimum_required(VERSION 3.17)
22

33
set(C_API_TESTS_NAME taichi_c_api_tests)
44
if (WIN32)

cmake/TaichiExamples.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.0)
1+
cmake_minimum_required(VERSION 3.17)
22

33
function(add_taichi_example NAME)
44
set(TARGET_NAME "cpp_examples_${NAME}")

cmake/TaichiTests.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.0)
1+
cmake_minimum_required(VERSION 3.17)
22

33
set(TESTS_NAME taichi_cpp_tests)
44
if (WIN32)

0 commit comments

Comments
 (0)