Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""

Unfortunatly not all buildbots are updated.

This reverts commit ffb807ab53.
This commit is contained in:
Mark de Wever
2023-05-06 16:53:15 +02:00
parent 8f82d8ee76
commit e8e8707b4a
36 changed files with 137 additions and 43 deletions

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
include(CheckIncludeFiles) include(CheckIncludeFiles)
include(GNUInstallDirs) include(GNUInstallDirs)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -11,6 +11,13 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(Clang) project(Clang)
set(CLANG_BUILT_STANDALONE TRUE) set(CLANG_BUILT_STANDALONE TRUE)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
endif() endif()
# Must go below project(..) # Must go below project(..)

View File

@@ -1,6 +1,6 @@
project(exec C) project(exec C)
cmake_minimum_required(VERSION 3.20.0) 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,13 +3,20 @@
# 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.20.0) cmake_minimum_required(VERSION 3.13.4)
# Check if compiler-rt is built as a standalone project. # Check if compiler-rt is built as a standalone project.
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD)
project(CompilerRT C CXX ASM) project(CompilerRT C CXX ASM)
set(COMPILER_RT_STANDALONE_BUILD TRUE) set(COMPILER_RT_STANDALONE_BUILD TRUE)
set_property(GLOBAL PROPERTY USE_FOLDERS ON) set_property(GLOBAL PROPERTY USE_FOLDERS ON)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
endif() endif()
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")

View File

@@ -3,7 +3,14 @@
# 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.20.0) cmake_minimum_required(VERSION 3.13.4)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(CompilerRTBuiltins C ASM) project(CompilerRTBuiltins C ASM)

View File

@@ -1,5 +1,12 @@
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(CompilerRTCRT C) project(CompilerRTCRT C)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -39,6 +39,13 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
message("Building Flang as a standalone project.") message("Building Flang as a standalone project.")
project(Flang) project(Flang)
set(FLANG_STANDALONE_BUILD ON) set(FLANG_STANDALONE_BUILD ON)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
else() else()
set(FLANG_STANDALONE_BUILD OFF) set(FLANG_STANDALONE_BUILD OFF)
endif() endif()

View File

@@ -1,5 +1,5 @@
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
project(FortranDecimal C CXX) project(FortranDecimal C CXX)

View File

@@ -7,7 +7,14 @@
#===------------------------------------------------------------------------===# #===------------------------------------------------------------------------===#
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
project(FlangRuntime C CXX) project(FlangRuntime C CXX)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
# Include LLVM's cmake policies. # Include LLVM's cmake policies.
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)

View File

@@ -1,5 +1,5 @@
project(hello_world) project(hello_world)
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
include(../examples.cmake) include(../examples.cmake)
add_example( add_example(

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
project( libclc VERSION 0.2.0 LANGUAGES CXX C) project( libclc VERSION 0.2.0 LANGUAGES CXX C)

View File

@@ -4,7 +4,7 @@
#=============================================================================== #===============================================================================
# Setup Project # Setup Project
#=============================================================================== #===============================================================================
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")

View File

@@ -4,7 +4,7 @@
# Setup Project # Setup Project
#=============================================================================== #===============================================================================
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")

View File

@@ -2,7 +2,7 @@
# Setup Project # Setup Project
#=============================================================================== #===============================================================================
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")

View File

@@ -30,7 +30,8 @@ set(LIBUNWIND_ASM_SOURCES
# CMake doesn't work correctly with assembly on AIX. Workaround by compiling # CMake doesn't work correctly with assembly on AIX. Workaround by compiling
# as C files as well. # as C files as well.
if((APPLE AND CMAKE_VERSION VERSION_LESS 3.19) OR if((APPLE AND CMAKE_VERSION VERSION_LESS 3.19) OR
(MINGW AND CMAKE_VERSION VERSION_LESS 3.17)) (MINGW AND CMAKE_VERSION VERSION_LESS 3.17) OR
(${CMAKE_SYSTEM_NAME} MATCHES "AIX"))
set_source_files_properties(${LIBUNWIND_ASM_SOURCES} PROPERTIES LANGUAGE C) set_source_files_properties(${LIBUNWIND_ASM_SOURCES} PROPERTIES LANGUAGE C)
endif() endif()

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -11,6 +11,13 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(lld) project(lld)
set(LLD_BUILT_STANDALONE TRUE) set(LLD_BUILT_STANDALONE TRUE)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
endif() endif()
# Must go below project(..) # Must go below project(..)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -19,6 +19,13 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(lldb) project(lldb)
set(LLDB_BUILT_STANDALONE TRUE) set(LLDB_BUILT_STANDALONE TRUE)
set(LLVM_INCLUDE_TESTS ON CACHE INTERNAL "") set(LLVM_INCLUDE_TESTS ON CACHE INTERNAL "")
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
endif() endif()
# Must go below project(..) # Must go below project(..)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
project(Debugserver LANGUAGES C CXX ASM-ATT) project(Debugserver LANGUAGES C CXX ASM-ATT)
@@ -7,6 +7,13 @@ include(GNUInstallDirs)
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(LLDB_BUILT_STANDALONE TRUE) set(LLDB_BUILT_STANDALONE TRUE)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
set(CMAKE_MODULE_PATH set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH} ${CMAKE_MODULE_PATH}

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
if (NOT IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/../libunwind") if (NOT IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/../libunwind")
message(FATAL_ERROR "llvm-libgcc requires being built in a monorepo layout with libunwind available") message(FATAL_ERROR "llvm-libgcc requires being built in a monorepo layout with libunwind available")

View File

@@ -1,6 +1,13 @@
# 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.20.0) cmake_minimum_required(VERSION 3.13.4)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake

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.20.0 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.
@@ -911,7 +911,7 @@ and uses them to build a simple application ``simple-tool``.
.. code-block:: cmake .. code-block:: cmake
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
project(SimpleProject) project(SimpleProject)
find_package(LLVM REQUIRED CONFIG) find_package(LLVM REQUIRED CONFIG)

View File

@@ -280,7 +280,7 @@ uses the package and provides other details.
=========================================================== ============ ========================================== =========================================================== ============ ==========================================
Package Version Notes Package Version Notes
=========================================================== ============ ========================================== =========================================================== ============ ==========================================
`CMake <http://cmake.org/>`__ >=3.20.0 Makefile/workspace generator `CMake <http://cmake.org/>`__ >=3.13.4 Makefile/workspace generator
`GCC <http://gcc.gnu.org/>`_ >=7.1.0 C/C++ compiler\ :sup:`1` `GCC <http://gcc.gnu.org/>`_ >=7.1.0 C/C++ compiler\ :sup:`1`
`python <http://www.python.org/>`_ >=3.6 Automated test suite\ :sup:`2` `python <http://www.python.org/>`_ >=3.6 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

@@ -47,11 +47,6 @@ Non-comprehensive list of changes in this release
Update on required toolchains to build LLVM Update on required toolchains to build LLVM
------------------------------------------- -------------------------------------------
With LLVM 17.x we raised the version requirement of CMake used to build LLVM.
The new requirements are as follows:
* CMake >= 3.20.0
Changes to the LLVM IR Changes to the LLVM IR
---------------------- ----------------------

View File

@@ -1,5 +1,5 @@
# MLIR project. # MLIR project.
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -11,6 +11,13 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(mlir) project(mlir)
set(MLIR_STANDALONE_BUILD TRUE) set(MLIR_STANDALONE_BUILD TRUE)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
endif() endif()
# Must go below project(..) # Must go below project(..)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
project(standalone-dialect LANGUAGES CXX C) project(standalone-dialect LANGUAGES CXX C)
set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON) set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -12,6 +12,13 @@ list(INSERT CMAKE_MODULE_PATH 0
if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(OPENMP_STANDALONE_BUILD TRUE) set(OPENMP_STANDALONE_BUILD TRUE)
project(openmp C CXX) project(openmp C CXX)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
endif() endif()
# Must go below project(..) # Must go below project(..)

View File

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

View File

@@ -307,7 +307,7 @@ require a few additions.
.. code-block:: cmake .. code-block:: cmake
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
project(offloadTest VERSION 1.0 LANGUAGES CXX) project(offloadTest VERSION 1.0 LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp") list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
@@ -318,7 +318,7 @@ require a few additions.
target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX) target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp) target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
Using this module requires at least CMake version 3.20.0. Supported languages Using this module requires at least CMake version 3.13.4. Supported languages
are C and C++ with Fortran support planned in the future. Compiler support is are C and C++ with Fortran support planned in the future. Compiler support is
best for Clang but this module should work for other compiler vendors such as best for Clang but this module should work for other compiler vendors such as
IBM, GNU. IBM, GNU.

View File

@@ -9,7 +9,7 @@
# #
project (libompd) project (libompd)
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
add_library (ompd SHARED TargetValue.cpp omp-debug.cpp omp-state.cpp omp-icv.cpp) add_library (ompd SHARED TargetValue.cpp omp-debug.cpp omp-state.cpp omp-icv.cpp)

View File

@@ -10,7 +10,7 @@
# #
##===----------------------------------------------------------------------===## ##===----------------------------------------------------------------------===##
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
# Define the suffix for the runtime messaging dumps. # Define the suffix for the runtime messaging dumps.
add_definitions(-DTARGET_NAME=RPC) add_definitions(-DTARGET_NAME=RPC)

View File

@@ -79,7 +79,7 @@ be used to override the standard flag searching for a given compiler.
# TODO: Test more compilers # TODO: Test more compilers
cmake_policy(PUSH) cmake_policy(PUSH)
cmake_policy(VERSION 3.20.0) cmake_policy(VERSION 3.13.4)
find_package(OpenMP ${OpenMPTarget_FIND_VERSION} REQUIRED) find_package(OpenMP ${OpenMPTarget_FIND_VERSION} REQUIRED)

View File

@@ -26,7 +26,7 @@ require a few additions.
.. code-block:: cmake .. code-block:: cmake
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
project(offloadTest VERSION 1.0 LANGUAGES CXX) project(offloadTest VERSION 1.0 LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp") list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
@@ -37,7 +37,7 @@ require a few additions.
target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX) target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp) target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
Using this module requires at least CMake version 3.20.0. Supported languages Using this module requires at least CMake version 3.13.4. Supported languages
are C and C++ with Fortran support planned in the future. If your application are C and C++ with Fortran support planned in the future. If your application
requires building for a specific device architecture you can set the requires building for a specific device architecture you can set the
``OpenMPTarget_<device>_ARCH=<flag>`` variable. Compiler support is best for ``OpenMPTarget_<device>_ARCH=<flag>`` variable. Compiler support is best for

View File

@@ -1,7 +1,14 @@
# 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.20.0) cmake_minimum_required(VERSION 3.13.4)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
set(POLLY_STANDALONE_BUILD TRUE) set(POLLY_STANDALONE_BUILD TRUE)
endif() endif()

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.20.0) 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 .*$")

View File

@@ -1,5 +1,12 @@
# This file handles building LLVM runtime sub-projects. # This file handles building LLVM runtime sub-projects.
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.13.4)
if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
message(WARNING
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
"minimum version of CMake required to build LLVM will become 3.20.0, and "
"using an older CMake will become an error. Please upgrade your CMake to "
"at least 3.20.0 now to avoid issues in the future!")
endif()
project(Runtimes C CXX ASM) project(Runtimes C CXX ASM)
# Add path for custom and the LLVM build's modules to the CMake module path. # Add path for custom and the LLVM build's modules to the CMake module path.