[llvm] 638d84b - [cmake] Configure policy CMP0116

Dave Lee via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 08:57:45 PDT 2021


Author: Dave Lee
Date: 2021-04-23T08:57:40-07:00
New Revision: 638d84b60b7e7b7fa9099939ab4de2ec1e0c52c3

URL: https://github.com/llvm/llvm-project/commit/638d84b60b7e7b7fa9099939ab4de2ec1e0c52c3
DIFF: https://github.com/llvm/llvm-project/commit/638d84b60b7e7b7fa9099939ab4de2ec1e0c52c3.diff

LOG: [cmake] Configure policy CMP0116

Using `cmake` >=3.20 results in many warnings about this new policy. This change silences the warnings by explicitly declaring use of the "OLD" behavior.

This policy currently affects only one place: the `tablegen()` function in `TableGen.cmake`.

Differential Revision: https://reviews.llvm.org/D101083

Added: 
    

Modified: 
    llvm/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 9e9785345c43..f6bf9456f66f 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -2,6 +2,12 @@
 
 cmake_minimum_required(VERSION 3.13.4)
 
+# CMP0116: Ninja generators transform `DEPFILE`s from `add_custom_command()`
+# New in CMake 3.20. https://cmake.org/cmake/help/latest/policy/CMP0116.html
+if(POLICY CMP0116)
+  cmake_policy(SET CMP0116 OLD)
+endif()
+
 set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
 
 if(NOT DEFINED LLVM_VERSION_MAJOR)


        


More information about the llvm-commits mailing list