This is a preparation to require CMake 3.20.0 after LLVM 16 has been
released.
This change has been discussed on discourse
https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193
Paths
| Differential D137724
[CMake] Warn when the version is older than 3.20.0. ClosedPublic Authored by Mordante on Nov 9 2022, 9:09 AM.
Details Summary This is a preparation to require CMake 3.20.0 after LLVM 16 has been This change has been discussed on discourse
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptNov 9 2022, 9:15 AM Herald added subscribers: llvm-commits, libcxx-commits, openmp-commits and 5 others. · View Herald Transcript Comment Actions I think this is fine as we have discussed before. But I really dislike the code duplication for the check. We could put it in a include() I guess - but maybe it's not worth it. Comment Actions
I wanted to make sure it shows up in different build scenarios. The code is temporary, once we switch to CMake 3.20.0 we can just change the cmake_minimum_required and remove these verbose blocks. Comment Actions I think if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) checks for standalone builds is not necessary. The check in llvm/CMakeLists.txt suffices. Comment Actions
I can remove the others, but we need to keep the one in runtimes/CMakeLists.txt too. The runtimes (libc++, libc++abi, and libunwind) can be build without building or configuring LLVM. This revision is now accepted and ready to land.Nov 9 2022, 12:18 PM Comment Actions LGTM (sorry, it looks like I approved on behalf of all libc++ vendors but that wasn't my intention).
Comment Actions Thanks for all reviews!
No but I've been quite busy. I needed some time to find the list of buildbot owners to mail after landing this.
This revision was landed with ongoing or failed builds.Dec 11 2022, 11:19 AM Closed by commit rGd40dc417389e: [CMake] Warn when the version is older than 3.20.0. (authored by Mordante). · Explain Why This revision was automatically updated to reflect the committed changes. Mordante marked an inline comment as done. Mordante added a reverting change: D144509: [CMake] Bumps minimum version to 3.20.0..Feb 21 2023, 11:15 AM Mordante added a reverting change: rG44c6b905f852: [CMake] Bumps minimum version to 3.20.0..Mar 4 2023, 3:41 AM Mordante added a reverting change: D151344: Reland "[CMake] Bumps minimum version to 3.20.0..May 27 2023, 3:45 AM Mordante added a reverting change: rGcbaa3597aaf6: Reland "[CMake] Bumps minimum version to 3.20.0..May 27 2023, 3:51 AM
Revision Contents
Diff 481933 clang/CMakeLists.txt
compiler-rt/CMakeLists.txt
compiler-rt/lib/builtins/CMakeLists.txt
compiler-rt/lib/crt/CMakeLists.txt
flang/CMakeLists.txt
flang/runtime/CMakeLists.txt
lld/CMakeLists.txt
lldb/CMakeLists.txt
lldb/tools/debugserver/CMakeLists.txt
llvm/CMakeLists.txt
llvm/docs/ReleaseNotes.rst
mlir/CMakeLists.txt
openmp/CMakeLists.txt
polly/CMakeLists.txt
runtimes/CMakeLists.txt
|
I wonder if we could move this to CMakePolicy.cmake, though admittedly you'd have to somehow avoid warning multiple times in in-tree builds.