[llvm] [CMake] Do not set CMP0116 explicitly to old (PR #90385)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 28 01:36:52 PDT 2024


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/90385

CMP0116 was originally set to old to get rid of warnings. However, this behavior is now set to new by default with the minimum CMake version that LLVM requires so does not produce any warnings, and setting it explicitly to old does produce a warning in newer CMake versions. Due to these reasons, remove this check for now.

Splitting off from removing the CMP0114 check just in case something breaks.

Partially fixes #83727.

>From ef2ba58c0627ac6d7451f278b050bc2821b9a889 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Sun, 28 Apr 2024 08:34:53 +0000
Subject: [PATCH] [CMake] Do not set CMP0116 explicitly to old

CMP0116 was originally set to old to get rid of warnings. However, this
behavior is now set to new by default with the minimum CMake version that LLVM
requires so does not produce any warnings, and setting it explicitly to old
does produce a warning in newer CMake versions. Due to these reasons, remove
this check for now.

Splitting off from removing the CMP0114 check just in case something breaks.

Partially fixes #83727.
---
 cmake/Modules/CMakePolicy.cmake | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/cmake/Modules/CMakePolicy.cmake b/cmake/Modules/CMakePolicy.cmake
index 1c18c1810dae62..a468751e7e675a 100644
--- a/cmake/Modules/CMakePolicy.cmake
+++ b/cmake/Modules/CMakePolicy.cmake
@@ -5,11 +5,6 @@
 if(POLICY CMP0114)
   cmake_policy(SET CMP0114 OLD)
 endif()
-# 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()
 
 # MSVC debug information format flags are selected via
 # CMAKE_MSVC_DEBUG_INFORMATION_FORMAT, instead of



More information about the llvm-commits mailing list