diff options
author | Nico Weber <thakis@chromium.org> | 2023-05-17 10:46:45 -0400 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2023-05-17 10:53:33 -0400 |
commit | d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6 (patch) | |
tree | efbb52b2ca03bfac87b6e9a3ebb106d8428270cb /openmp | |
parent | d9610b4a56c532614545eef5995362e99b776535 (diff) | |
download | llvm-d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6.tar.gz |
Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""
This reverts commit 65429b9af6a2c99d340ab2dcddd41dab201f399c.
Broke several projects, see https://reviews.llvm.org/D144509#4347562 onwards.
Also reverts follow-up commit "[OpenMP] Compile assembly files as ASM, not C"
This reverts commit 4072c8aee4c89c4457f4f30d01dc9bb4dfa52559.
Also reverts fix attempt "[cmake] Set CMP0091 to fix Windows builds after the cmake_minimum_required bump"
This reverts commit 7d47dac5f828efd1d378ba44a97559114f00fb64.
Diffstat (limited to 'openmp')
-rw-r--r-- | openmp/CMakeLists.txt | 11 | ||||
-rw-r--r-- | openmp/cmake/DetectTestCompiler/CMakeLists.txt | 2 | ||||
-rw-r--r-- | openmp/docs/SupportAndFAQ.rst | 4 | ||||
-rw-r--r-- | openmp/libompd/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | openmp/libomptarget/plugins/remote/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | openmp/runtime/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | openmp/tools/Modules/FindOpenMPTarget.cmake | 2 | ||||
-rw-r--r-- | openmp/tools/Modules/README.rst | 4 |
8 files changed, 19 insertions, 10 deletions
diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt index 04678cbd4f33..e7403e5f60f6 100644 --- a/openmp/CMakeLists.txt +++ b/openmp/CMakeLists.txt @@ -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) @@ -11,7 +11,14 @@ list(INSERT CMAKE_MODULE_PATH 0 # llvm/runtimes/ will set OPENMP_STANDALONE_BUILD. if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") set(OPENMP_STANDALONE_BUILD TRUE) - project(openmp C CXX ASM) + 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() # Must go below project(..) diff --git a/openmp/cmake/DetectTestCompiler/CMakeLists.txt b/openmp/cmake/DetectTestCompiler/CMakeLists.txt index 8ea7ab8d45ba..bc2aa52fbc1c 100644 --- a/openmp/cmake/DetectTestCompiler/CMakeLists.txt +++ b/openmp/cmake/DetectTestCompiler/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20.0) +cmake_minimum_required(VERSION 3.13.4) project(DetectTestCompiler C CXX) include(CheckCCompilerFlag) diff --git a/openmp/docs/SupportAndFAQ.rst b/openmp/docs/SupportAndFAQ.rst index c50433bb5b6e..249eb18b82a2 100644 --- a/openmp/docs/SupportAndFAQ.rst +++ b/openmp/docs/SupportAndFAQ.rst @@ -307,7 +307,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") @@ -318,7 +318,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. Compiler support is best for Clang but this module should work for other compiler vendors such as IBM, GNU. diff --git a/openmp/libompd/src/CMakeLists.txt b/openmp/libompd/src/CMakeLists.txt index 0402a0177201..f361fcf35a27 100644 --- a/openmp/libompd/src/CMakeLists.txt +++ b/openmp/libompd/src/CMakeLists.txt @@ -9,7 +9,7 @@ # 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) diff --git a/openmp/libomptarget/plugins/remote/src/CMakeLists.txt b/openmp/libomptarget/plugins/remote/src/CMakeLists.txt index 8a16963c913a..6299fb38ee8b 100644 --- a/openmp/libomptarget/plugins/remote/src/CMakeLists.txt +++ b/openmp/libomptarget/plugins/remote/src/CMakeLists.txt @@ -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. add_definitions(-DTARGET_NAME=RPC) diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt index bb5822264514..0e778ec14536 100644 --- a/openmp/runtime/src/CMakeLists.txt +++ b/openmp/runtime/src/CMakeLists.txt @@ -133,6 +133,8 @@ libomp_get_asmflags(LIBOMP_CONFIGURED_ASMFLAGS) # Set the compiler flags for each type of source set_source_files_properties(${LIBOMP_CXXFILES} PROPERTIES COMPILE_FLAGS "${LIBOMP_CONFIGURED_CXXFLAGS}") set_source_files_properties(${LIBOMP_ASMFILES} ${LIBOMP_GNUASMFILES} PROPERTIES COMPILE_FLAGS "${LIBOMP_CONFIGURED_ASMFLAGS}") +# Let the compiler handle the GNU assembly files +set_source_files_properties(${LIBOMP_GNUASMFILES} PROPERTIES LANGUAGE C) # Remove any cmake-automatic linking of the standard C++ library. # We neither need (nor want) the standard C++ library dependency even though we compile c++ files. diff --git a/openmp/tools/Modules/FindOpenMPTarget.cmake b/openmp/tools/Modules/FindOpenMPTarget.cmake index 424294090d5d..3591a49f685b 100644 --- a/openmp/tools/Modules/FindOpenMPTarget.cmake +++ b/openmp/tools/Modules/FindOpenMPTarget.cmake @@ -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) diff --git a/openmp/tools/Modules/README.rst b/openmp/tools/Modules/README.rst index b8cc5f08b390..f19619e389b3 100644 --- a/openmp/tools/Modules/README.rst +++ b/openmp/tools/Modules/README.rst @@ -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") @@ -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 |