Skip to content

Commit 44d3802

Browse files
committed
Revert "Revert "Revert "[CMake] Bumps minimum version to 3.20.0."""
This reverts commit 1ef4c3c. Two buildbots still haven't been updated.
1 parent d3df7b1 commit 44d3802

File tree

37 files changed

+138
-44
lines changed

37 files changed

+138
-44
lines changed

bolt/runtime/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.20.0)
1+
cmake_minimum_required(VERSION 3.13.4)
22
include(CheckIncludeFiles)
33
include(GNUInstallDirs)
44

clang/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.20.0)
1+
cmake_minimum_required(VERSION 3.13.4)
22

33
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
44
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -11,6 +11,13 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
1111
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
1212
project(Clang)
1313
set(CLANG_BUILT_STANDALONE TRUE)
14+
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
15+
message(WARNING
16+
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
17+
"minimum version of CMake required to build LLVM will become 3.20.0, and "
18+
"using an older CMake will become an error. Please upgrade your CMake to "
19+
"at least 3.20.0 now to avoid issues in the future!")
20+
endif()
1421
endif()
1522

1623
# Must go below project(..)

clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project(exec C)
22

3-
cmake_minimum_required(VERSION 3.20.0)
3+
cmake_minimum_required(VERSION 3.13.4)
44

55
include(CheckCCompilerFlag)
66
check_c_compiler_flag("-std=c99" C99_SUPPORTED)

compiler-rt/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,20 @@
33
# An important constraint of the build is that it only produces libraries
44
# based on the ability of the host toolchain to target various platforms.
55

6-
cmake_minimum_required(VERSION 3.20.0)
6+
cmake_minimum_required(VERSION 3.13.4)
77

88
# Check if compiler-rt is built as a standalone project.
99
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD)
1010
project(CompilerRT C CXX ASM)
1111
set(COMPILER_RT_STANDALONE_BUILD TRUE)
1212
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
13+
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
14+
message(WARNING
15+
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
16+
"minimum version of CMake required to build LLVM will become 3.20.0, and "
17+
"using an older CMake will become an error. Please upgrade your CMake to "
18+
"at least 3.20.0 now to avoid issues in the future!")
19+
endif()
1320
endif()
1421

1522
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")

compiler-rt/lib/builtins/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33
# architecture-specific code in various subdirectories.
44

55
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
6-
cmake_minimum_required(VERSION 3.20.0)
6+
cmake_minimum_required(VERSION 3.13.4)
7+
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
8+
message(WARNING
9+
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
10+
"minimum version of CMake required to build LLVM will become 3.20.0, and "
11+
"using an older CMake will become an error. Please upgrade your CMake to "
12+
"at least 3.20.0 now to avoid issues in the future!")
13+
endif()
714

815
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
916
project(CompilerRTBuiltins C ASM)

compiler-rt/lib/crt/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
2-
cmake_minimum_required(VERSION 3.20.0)
2+
cmake_minimum_required(VERSION 3.13.4)
3+
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
4+
message(WARNING
5+
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
6+
"minimum version of CMake required to build LLVM will become 3.20.0, and "
7+
"using an older CMake will become an error. Please upgrade your CMake to "
8+
"at least 3.20.0 now to avoid issues in the future!")
9+
endif()
310

411
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
512
project(CompilerRTCRT C)

flang/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.20.0)
1+
cmake_minimum_required(VERSION 3.13.4)
22

33
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
44
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -31,6 +31,13 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
3131
message("Building Flang as a standalone project.")
3232
project(Flang)
3333
set(FLANG_STANDALONE_BUILD ON)
34+
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
35+
message(WARNING
36+
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
37+
"minimum version of CMake required to build LLVM will become 3.20.0, and "
38+
"using an older CMake will become an error. Please upgrade your CMake to "
39+
"at least 3.20.0 now to avoid issues in the future!")
40+
endif()
3441
else()
3542
set(FLANG_STANDALONE_BUILD OFF)
3643
endif()

flang/lib/Decimal/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
2-
cmake_minimum_required(VERSION 3.20.0)
2+
cmake_minimum_required(VERSION 3.13.4)
33

44
project(FortranDecimal C CXX)
55

flang/runtime/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@
77
#===------------------------------------------------------------------------===#
88

99
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
10-
cmake_minimum_required(VERSION 3.20.0)
10+
cmake_minimum_required(VERSION 3.13.4)
11+
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
12+
message(WARNING
13+
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
14+
"minimum version of CMake required to build LLVM will become 3.20.0, and "
15+
"using an older CMake will become an error. Please upgrade your CMake to "
16+
"at least 3.20.0 now to avoid issues in the future!")
17+
endif()
1118

1219
project(FlangRuntime C CXX)
1320

libc/CMakeLists.txt

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

33
# Include LLVM's cmake policies.
44
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)

0 commit comments

Comments
 (0)