1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[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 26292a58c9
commit 1f1171c0d4
6 changed files with 16 additions and 22 deletions

View File

@ -1,12 +1,6 @@
# See docs/CMake.html for instructions about how to build LLVM with CMake.
cmake_minimum_required(VERSION 3.4.3)
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()
cmake_minimum_required(VERSION 3.13.4)
if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW)

View File

@ -34,7 +34,7 @@ Quick start
We use here the command-line, non-interactive CMake interface.
#. `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
through the PATH environment variable.
@ -717,7 +717,7 @@ and uses them to build a simple application ``simple-tool``.
.. code-block:: cmake
cmake_minimum_required(VERSION 3.4.3)
cmake_minimum_required(VERSION 3.13.4)
project(SimpleProject)
find_package(LLVM REQUIRED CONFIG)

View File

@ -54,7 +54,7 @@ program. The example uses only CMake language-defined functions.
.. code-block:: cmake
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
project(HelloWorld)
add_executable(HelloWorld HelloWorld.cpp)
@ -64,13 +64,13 @@ block to define "APPLE" when targeting Apple platforms:
.. code-block:: cmake
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.15)
project(HelloWorld)
add_executable(HelloWorld HelloWorld.cpp)
if(APPLE)
target_compile_definitions(HelloWorld PUBLIC APPLE)
endif()
Variables, Types, and Scope
===========================
@ -93,7 +93,7 @@ example:
set(var_name var1)
set(${var_name} foo) # same as "set(var1 foo)"
set(${${var_name}}_var bar) # same as "set(foo_var bar)"
Dereferencing an unset variable results in an empty expansion. It is a common
pattern in CMake to conditionally set variables knowing that it will be used in
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:
set(extra_sources Apple.cpp)
endif()
add_executable(HelloWorld HelloWorld.cpp ${extra_sources})
In this example the ``extra_sources`` variable is only defined if you're
targeting an Apple platform. For all other targets the ``extra_sources`` will be
evaluated as empty before add_executable is given its arguments.
@ -124,7 +124,7 @@ defining lists:
# Creates a list with members a, b, c, and d
set(my_list a b c d)
set(my_list "a;b;c;d")
# Creates a string "a b c d"
set(my_string "a b c d")
@ -141,7 +141,7 @@ make a list of variable names that refer to other lists. For example:
set(a 1 2 3)
set(b 4 5 6)
set(c 7 8 9)
With this layout you can iterate through the list of lists printing each value
with the following code:
@ -152,7 +152,7 @@ with the following code:
message(${value})
endforeach()
endforeach()
You'll notice that the inner foreach loop's list is doubly dereferenced. This is
because the first dereference turns ``list_name`` into the name of the sub-list
(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:
message("${var}")
endforeach()
endmacro()
set(my_list a b c d)
set(my_list_of_numbers 1 2 3 4)
print_list(my_list_of_numbers)

View File

@ -167,7 +167,7 @@ uses the package and provides other details.
=========================================================== ============ ==========================================
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`
`python <http://www.python.org/>`_ >=2.7 Automated test suite\ :sup:`2`
`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
# if this is the entry point.
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)
endif()
@ -56,7 +56,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
set_property(GLOBAL APPEND PROPERTY SUB_COMPONENTS ${name})
endfunction()
cmake_minimum_required(VERSION 3.4.3)
cmake_minimum_required(VERSION 3.13.4)
project(Runtimes C CXX ASM)
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
# call to project() below.