[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
This commit is contained in:
Louis Dionne 2020-04-22 11:15:05 -04:00
parent 3eec657825
commit afa1afd410
28 changed files with 38 additions and 47 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
if(POLICY CMP0075) if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW) cmake_policy(SET CMP0075 NEW)

View File

@ -1,6 +1,6 @@
project(exec C) project(exec C)
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
include(CheckCCompilerFlag) include(CheckCCompilerFlag)
check_c_compiler_flag("-std=c99" C99_SUPPORTED) check_c_compiler_flag("-std=c99" C99_SUPPORTED)

View File

@ -3,7 +3,7 @@
# An important constraint of the build is that it only produces libraries # An important constraint of the build is that it only produces libraries
# based on the ability of the host toolchain to target various platforms. # based on the ability of the host toolchain to target various platforms.
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
if(POLICY CMP0075) if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW) cmake_policy(SET CMP0075 NEW)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
project(custom-libcxx C CXX) project(custom-libcxx C CXX)
# Build static libcxxabi. # Build static libcxxabi.

View File

@ -3,7 +3,7 @@
# architecture-specific code in various subdirectories. # architecture-specific code in various subdirectories.
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
project(CompilerRTBuiltins C ASM) project(CompilerRTBuiltins C ASM)
set(COMPILER_RT_STANDALONE_BUILD TRUE) set(COMPILER_RT_STANDALONE_BUILD TRUE)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.9.0) cmake_minimum_required(VERSION 3.13.4)
# RPATH settings on macOS do not affect INSTALL_NAME. # RPATH settings on macOS do not affect INSTALL_NAME.
if (POLICY CMP0068) if (POLICY CMP0068)

View File

@ -1,4 +1,4 @@
cmake_minimum_required( VERSION 3.9.2 ) cmake_minimum_required(VERSION 3.13.4)
project( libclc VERSION 0.2.0 LANGUAGES CXX ) project( libclc VERSION 0.2.0 LANGUAGES CXX )
include( GNUInstallDirs ) include( GNUInstallDirs )

View File

@ -8,7 +8,7 @@ endif()
#=============================================================================== #===============================================================================
# Setup Project # Setup Project
#=============================================================================== #===============================================================================
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
if(POLICY CMP0042) if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
if(POLICY CMP0068) if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW) cmake_policy(SET CMP0068 NEW)

View File

@ -8,7 +8,7 @@ endif()
# Setup Project # Setup Project
#=============================================================================== #===============================================================================
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
if(POLICY CMP0042) if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default

View File

@ -2,7 +2,7 @@
# Setup Project # Setup Project
#=============================================================================== #===============================================================================
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
if (POLICY CMP0042) if (POLICY CMP0042)
cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default

View File

@ -1,7 +1,7 @@
# Check if lld is built as a standalone project. # Check if lld is built as a standalone project.
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(lld) project(lld)
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(LLD_BUILT_STANDALONE TRUE) set(LLD_BUILT_STANDALONE TRUE)

View File

@ -1,7 +1,4 @@
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
cmake_minimum_required(VERSION 3.13)
endif()
if(POLICY CMP0075) if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW) cmake_policy(SET CMP0075 NEW)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
project(Debugserver LANGUAGES C CXX ASM-ATT) project(Debugserver LANGUAGES C CXX ASM-ATT)

View File

@ -1,12 +1,6 @@
# See docs/CMake.html for instructions about how to build LLVM with CMake. # See docs/CMake.html for instructions about how to build LLVM with CMake.
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
if ("${CMAKE_VERSION}" VERSION_LESS "3.13.4")
message(FATAL_ERROR
"Your CMake version is ${CMAKE_VERSION}. The minimum version of CMake "
"required to build LLVM is now 3.13.4.")
endif()
if(POLICY CMP0068) if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW) cmake_policy(SET CMP0068 NEW)

View File

@ -34,7 +34,7 @@ Quick start
We use here the command-line, non-interactive CMake interface. We use here the command-line, non-interactive CMake interface.
#. `Download <http://www.cmake.org/cmake/resources/software.html>`_ and install #. `Download <http://www.cmake.org/cmake/resources/software.html>`_ and install
CMake. Version 3.4.3 is the minimum required. CMake. Version 3.13.4 is the minimum required.
#. Open a shell. Your development tools must be reachable from this shell #. Open a shell. Your development tools must be reachable from this shell
through the PATH environment variable. through the PATH environment variable.
@ -717,7 +717,7 @@ and uses them to build a simple application ``simple-tool``.
.. code-block:: cmake .. code-block:: cmake
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
project(SimpleProject) project(SimpleProject)
find_package(LLVM REQUIRED CONFIG) find_package(LLVM REQUIRED CONFIG)

View File

@ -54,7 +54,7 @@ program. The example uses only CMake language-defined functions.
.. code-block:: cmake .. code-block:: cmake
cmake_minimum_required(VERSION 3.2) cmake_minimum_required(VERSION 3.15)
project(HelloWorld) project(HelloWorld)
add_executable(HelloWorld HelloWorld.cpp) add_executable(HelloWorld HelloWorld.cpp)
@ -64,7 +64,7 @@ block to define "APPLE" when targeting Apple platforms:
.. code-block:: cmake .. code-block:: cmake
cmake_minimum_required(VERSION 3.2) cmake_minimum_required(VERSION 3.15)
project(HelloWorld) project(HelloWorld)
add_executable(HelloWorld HelloWorld.cpp) add_executable(HelloWorld HelloWorld.cpp)
if(APPLE) if(APPLE)

View File

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

View File

@ -7,7 +7,7 @@
# Setting CMake minimum required version should be at the very top of the file # Setting CMake minimum required version should be at the very top of the file
# if this is the entry point. # if this is the entry point.
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
project(Runtimes C CXX ASM) project(Runtimes C CXX ASM)
endif() endif()
@ -56,7 +56,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
set_property(GLOBAL APPEND PROPERTY SUB_COMPONENTS ${name}) set_property(GLOBAL APPEND PROPERTY SUB_COMPONENTS ${name})
endfunction() endfunction()
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
project(Runtimes C CXX ASM) project(Runtimes C CXX ASM)
find_package(LLVM PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) find_package(LLVM PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)

View File

@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8.12) cmake_minimum_required(VERSION 3.13.4)
# Tell cmake 3.0+ that it's safe to clear the PROJECT_VERSION variable in the # Tell cmake 3.0+ that it's safe to clear the PROJECT_VERSION variable in the
# call to project() below. # call to project() below.

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.13.4)
if(POLICY CMP0068) if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW) cmake_policy(SET CMP0068 NEW)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR) cmake_minimum_required(VERSION 3.13.4)
# Add cmake directory to search for custom cmake functions. # Add cmake directory to search for custom cmake functions.
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 3.13.4)
project(DetectTestCompiler C CXX) project(DetectTestCompiler C CXX)
include(CheckCCompilerFlag) include(CheckCCompilerFlag)

View File

@ -17,7 +17,7 @@ function(libomp_check_linker_flag flag boolean)
set(library_source set(library_source
"int foo(int a) { return a*a; }") "int foo(int a) { return a*a; }")
set(cmake_source set(cmake_source
"cmake_minimum_required(VERSION 2.8) "cmake_minimum_required(VERSION 3.13.4)
project(foo C) project(foo C)
set(CMAKE_SHARED_LINKER_FLAGS \"${flag}\") set(CMAKE_SHARED_LINKER_FLAGS \"${flag}\")
add_library(foo SHARED src_to_link.c)") add_library(foo SHARED src_to_link.c)")

View File

@ -1 +1 @@
cmake_minimum_required(VERSION 3.1) cmake_minimum_required(VERSION 3.13.4)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1) cmake_minimum_required(VERSION 3.13.4)
option(ACXXEL_ENABLE_UNIT_TESTS "enable acxxel unit tests" ON) option(ACXXEL_ENABLE_UNIT_TESTS "enable acxxel unit tests" ON)
option(ACXXEL_ENABLE_MULTI_DEVICE_UNIT_TESTS "enable acxxel multi-device unit tests" OFF) option(ACXXEL_ENABLE_MULTI_DEVICE_UNIT_TESTS "enable acxxel multi-device unit tests" OFF)

View File

@ -1,7 +1,7 @@
# Check if this is a in tree build. # Check if this is a in tree build.
if (NOT DEFINED LLVM_MAIN_SRC_DIR) if (NOT DEFINED LLVM_MAIN_SRC_DIR)
project(Polly) project(Polly)
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
# Where is LLVM installed? # Where is LLVM installed?
find_package(LLVM CONFIG REQUIRED) find_package(LLVM CONFIG REQUIRED)

View File

@ -5,7 +5,7 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# #
#===----------------------------------------------------------------------===## #===----------------------------------------------------------------------===##
cmake_minimum_required(VERSION 3.4.3) cmake_minimum_required(VERSION 3.13.4)
set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h") set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$") file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")