Skip to content

Commit afa1afd

Browse files
committed
[CMake] Bump CMake minimum version to 3.13.4
This upgrade should be friction-less because we've already been ensuring that CMake >= 3.13.4 is used. This is part of the effort discussed on llvm-dev here: http://lists.llvm.org/pipermail/llvm-dev/2020-April/140578.html Differential Revision: https://reviews.llvm.org/D78648
1 parent 3eec657 commit afa1afd

File tree

28 files changed

+38
-47
lines changed

28 files changed

+38
-47
lines changed

clang/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.4.3)
1+
cmake_minimum_required(VERSION 3.13.4)
22

33
if(POLICY CMP0075)
44
cmake_policy(SET CMP0075 NEW)

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project(exec C)
22

3-
cmake_minimum_required(VERSION 3.4.3)
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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.4.3)
6+
cmake_minimum_required(VERSION 3.13.4)
77

88
if(POLICY CMP0075)
99
cmake_policy(SET CMP0075 NEW)

compiler-rt/cmake/Modules/CustomLibcxx/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.4.3)
1+
cmake_minimum_required(VERSION 3.13.4)
22
project(custom-libcxx C CXX)
33

44
# Build static libcxxabi.

compiler-rt/lib/builtins/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# architecture-specific code in various subdirectories.
44

55
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
6-
cmake_minimum_required(VERSION 3.4.3)
6+
cmake_minimum_required(VERSION 3.13.4)
77

88
project(CompilerRTBuiltins C ASM)
99
set(COMPILER_RT_STANDALONE_BUILD TRUE)

flang/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.9.0)
1+
cmake_minimum_required(VERSION 3.13.4)
22

33
# RPATH settings on macOS do not affect INSTALL_NAME.
44
if (POLICY CMP0068)

libclc/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required( VERSION 3.9.2 )
1+
cmake_minimum_required(VERSION 3.13.4)
22

33
project( libclc VERSION 0.2.0 LANGUAGES CXX )
44
include( GNUInstallDirs )

libcxx/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ endif()
88
#===============================================================================
99
# Setup Project
1010
#===============================================================================
11-
cmake_minimum_required(VERSION 3.4.3)
11+
cmake_minimum_required(VERSION 3.13.4)
1212

1313
if(POLICY CMP0042)
1414
cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default

libcxx/utils/ci/runtimes/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.4.3)
1+
cmake_minimum_required(VERSION 3.13.4)
22

33
if(POLICY CMP0068)
44
cmake_policy(SET CMP0068 NEW)

libcxxabi/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ endif()
88
# Setup Project
99
#===============================================================================
1010

11-
cmake_minimum_required(VERSION 3.4.3)
11+
cmake_minimum_required(VERSION 3.13.4)
1212

1313
if(POLICY CMP0042)
1414
cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default

libunwind/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Setup Project
33
#===============================================================================
44

5-
cmake_minimum_required(VERSION 3.4.3)
5+
cmake_minimum_required(VERSION 3.13.4)
66

77
if (POLICY CMP0042)
88
cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default

lld/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Check if lld is built as a standalone project.
22
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
33
project(lld)
4-
cmake_minimum_required(VERSION 3.4.3)
4+
cmake_minimum_required(VERSION 3.13.4)
55

66
set(CMAKE_INCLUDE_CURRENT_DIR ON)
77
set(LLD_BUILT_STANDALONE TRUE)

lldb/CMakeLists.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
cmake_minimum_required(VERSION 3.4.3)
2-
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
3-
cmake_minimum_required(VERSION 3.13)
4-
endif()
1+
cmake_minimum_required(VERSION 3.13.4)
52

63
if(POLICY CMP0075)
74
cmake_policy(SET CMP0075 NEW)

lldb/tools/debugserver/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.4.3)
1+
cmake_minimum_required(VERSION 3.13.4)
22

33
project(Debugserver LANGUAGES C CXX ASM-ATT)
44

llvm/CMakeLists.txt

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# See docs/CMake.html for instructions about how to build LLVM with CMake.
22

3-
cmake_minimum_required(VERSION 3.4.3)
4-
5-
if ("${CMAKE_VERSION}" VERSION_LESS "3.13.4")
6-
message(FATAL_ERROR
7-
"Your CMake version is ${CMAKE_VERSION}. The minimum version of CMake "
8-
"required to build LLVM is now 3.13.4.")
9-
endif()
3+
cmake_minimum_required(VERSION 3.13.4)
104

115
if(POLICY CMP0068)
126
cmake_policy(SET CMP0068 NEW)

llvm/docs/CMake.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Quick start
3434
We use here the command-line, non-interactive CMake interface.
3535

3636
#. `Download <http://www.cmake.org/cmake/resources/software.html>`_ and install
37-
CMake. Version 3.4.3 is the minimum required.
37+
CMake. Version 3.13.4 is the minimum required.
3838

3939
#. Open a shell. Your development tools must be reachable from this shell
4040
through the PATH environment variable.
@@ -717,7 +717,7 @@ and uses them to build a simple application ``simple-tool``.
717717

718718
.. code-block:: cmake
719719
720-
cmake_minimum_required(VERSION 3.4.3)
720+
cmake_minimum_required(VERSION 3.13.4)
721721
project(SimpleProject)
722722
723723
find_package(LLVM REQUIRED CONFIG)

llvm/docs/CMakePrimer.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ program. The example uses only CMake language-defined functions.
5454

5555
.. code-block:: cmake
5656
57-
cmake_minimum_required(VERSION 3.2)
57+
cmake_minimum_required(VERSION 3.15)
5858
project(HelloWorld)
5959
add_executable(HelloWorld HelloWorld.cpp)
6060
@@ -64,13 +64,13 @@ block to define "APPLE" when targeting Apple platforms:
6464

6565
.. code-block:: cmake
6666
67-
cmake_minimum_required(VERSION 3.2)
67+
cmake_minimum_required(VERSION 3.15)
6868
project(HelloWorld)
6969
add_executable(HelloWorld HelloWorld.cpp)
7070
if(APPLE)
7171
target_compile_definitions(HelloWorld PUBLIC APPLE)
7272
endif()
73-
73+
7474
Variables, Types, and Scope
7575
===========================
7676

@@ -93,7 +93,7 @@ example:
9393
set(var_name var1)
9494
set(${var_name} foo) # same as "set(var1 foo)"
9595
set(${${var_name}}_var bar) # same as "set(foo_var bar)"
96-
96+
9797
Dereferencing an unset variable results in an empty expansion. It is a common
9898
pattern in CMake to conditionally set variables knowing that it will be used in
9999
code paths that the variable isn't set. There are examples of this throughout
@@ -107,7 +107,7 @@ An example of variable empty expansion is:
107107
set(extra_sources Apple.cpp)
108108
endif()
109109
add_executable(HelloWorld HelloWorld.cpp ${extra_sources})
110-
110+
111111
In this example the ``extra_sources`` variable is only defined if you're
112112
targeting an Apple platform. For all other targets the ``extra_sources`` will be
113113
evaluated as empty before add_executable is given its arguments.
@@ -124,7 +124,7 @@ defining lists:
124124
# Creates a list with members a, b, c, and d
125125
set(my_list a b c d)
126126
set(my_list "a;b;c;d")
127-
127+
128128
# Creates a string "a b c d"
129129
set(my_string "a b c d")
130130
@@ -141,7 +141,7 @@ make a list of variable names that refer to other lists. For example:
141141
set(a 1 2 3)
142142
set(b 4 5 6)
143143
set(c 7 8 9)
144-
144+
145145
With this layout you can iterate through the list of lists printing each value
146146
with the following code:
147147

@@ -152,7 +152,7 @@ with the following code:
152152
message(${value})
153153
endforeach()
154154
endforeach()
155-
155+
156156
You'll notice that the inner foreach loop's list is doubly dereferenced. This is
157157
because the first dereference turns ``list_name`` into the name of the sub-list
158158
(a, b, or c in the example), then the second dereference is to get the value of
@@ -385,7 +385,7 @@ result in some unexpected behavior if using unreferenced variables. For example:
385385
message("${var}")
386386
endforeach()
387387
endmacro()
388-
388+
389389
set(my_list a b c d)
390390
set(my_list_of_numbers 1 2 3 4)
391391
print_list(my_list_of_numbers)

llvm/docs/GettingStarted.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ uses the package and provides other details.
167167
=========================================================== ============ ==========================================
168168
Package Version Notes
169169
=========================================================== ============ ==========================================
170-
`CMake <http://cmake.org/>`__ >=3.4.3 Makefile/workspace generator
170+
`CMake <http://cmake.org/>`__ >=3.13.4 Makefile/workspace generator
171171
`GCC <http://gcc.gnu.org/>`_ >=5.1.0 C/C++ compiler\ :sup:`1`
172172
`python <http://www.python.org/>`_ >=2.7 Automated test suite\ :sup:`2`
173173
`zlib <http://zlib.net>`_ >=1.2.3.4 Compression library\ :sup:`3`

llvm/runtimes/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Setting CMake minimum required version should be at the very top of the file
88
# if this is the entry point.
99
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
10-
cmake_minimum_required(VERSION 3.4.3)
10+
cmake_minimum_required(VERSION 3.13.4)
1111
project(Runtimes C CXX ASM)
1212
endif()
1313

@@ -56,7 +56,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
5656
set_property(GLOBAL APPEND PROPERTY SUB_COMPONENTS ${name})
5757
endfunction()
5858

59-
cmake_minimum_required(VERSION 3.4.3)
59+
cmake_minimum_required(VERSION 3.13.4)
6060
project(Runtimes C CXX ASM)
6161

6262
find_package(LLVM PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)

llvm/utils/benchmark/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required (VERSION 2.8.12)
1+
cmake_minimum_required(VERSION 3.13.4)
22

33
# Tell cmake 3.0+ that it's safe to clear the PROJECT_VERSION variable in the
44
# call to project() below.

mlir/examples/standalone/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.10)
1+
cmake_minimum_required(VERSION 3.13.4)
22

33
if(POLICY CMP0068)
44
cmake_policy(SET CMP0068 NEW)

openmp/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.13.4)
22

33
# Add cmake directory to search for custom cmake functions.
44
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})

openmp/cmake/DetectTestCompiler/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 2.8)
1+
cmake_minimum_required(VERSION 3.13.4)
22
project(DetectTestCompiler C CXX)
33

44
include(CheckCCompilerFlag)

openmp/runtime/cmake/LibompCheckLinkerFlag.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function(libomp_check_linker_flag flag boolean)
1717
set(library_source
1818
"int foo(int a) { return a*a; }")
1919
set(cmake_source
20-
"cmake_minimum_required(VERSION 2.8)
20+
"cmake_minimum_required(VERSION 3.13.4)
2121
project(foo C)
2222
set(CMAKE_SHARED_LINKER_FLAGS \"${flag}\")
2323
add_library(foo SHARED src_to_link.c)")

parallel-libs/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cmake_minimum_required(VERSION 3.1)
1+
cmake_minimum_required(VERSION 3.13.4)

parallel-libs/acxxel/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.1)
1+
cmake_minimum_required(VERSION 3.13.4)
22

33
option(ACXXEL_ENABLE_UNIT_TESTS "enable acxxel unit tests" ON)
44
option(ACXXEL_ENABLE_MULTI_DEVICE_UNIT_TESTS "enable acxxel multi-device unit tests" OFF)

polly/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Check if this is a in tree build.
22
if (NOT DEFINED LLVM_MAIN_SRC_DIR)
33
project(Polly)
4-
cmake_minimum_required(VERSION 3.4.3)
4+
cmake_minimum_required(VERSION 3.13.4)
55

66
# Where is LLVM installed?
77
find_package(LLVM CONFIG REQUIRED)

pstl/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
#
77
#===----------------------------------------------------------------------===##
8-
cmake_minimum_required(VERSION 3.4.3)
8+
cmake_minimum_required(VERSION 3.13.4)
99

1010
set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
1111
file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")

0 commit comments

Comments
 (0)