2 changes: 1 addition & 1 deletion openmp/tools/Modules/FindOpenMPTarget.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ be used to override the standard flag searching for a given compiler.
# TODO: Test more compilers

cmake_policy(PUSH)
cmake_policy(VERSION 3.20.0)
cmake_policy(VERSION 3.13.4)

find_package(OpenMP ${OpenMPTarget_FIND_VERSION} REQUIRED)

Expand Down
4 changes: 2 additions & 2 deletions openmp/tools/Modules/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require a few additions.

.. code-block:: cmake
cmake_minimum_required(VERSION 3.20.0)
cmake_minimum_required(VERSION 3.13.4)
project(offloadTest VERSION 1.0 LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
Expand All @@ -37,7 +37,7 @@ require a few additions.
target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
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
requires building for a specific device architecture you can set the
``OpenMPTarget_<device>_ARCH=<flag>`` variable. Compiler support is best for
Expand Down
9 changes: 8 additions & 1 deletion polly/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Check if this is a in tree build.
if (NOT DEFINED LLVM_MAIN_SRC_DIR)
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)
endif()

Expand Down
2 changes: 1 addition & 1 deletion pstl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# 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")
file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Expand Down
9 changes: 8 additions & 1 deletion runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# 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)

# Add path for custom and the LLVM build's modules to the CMake module path.
Expand Down