[llvm] 1a216dc - llvm: cmake: set CMP0114 to OLD to avoid warning

Nick Desaulniers via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 09:46:00 PDT 2022


Author: Nick Desaulniers
Date: 2022-06-03T09:33:07-07:00
New Revision: 1a216dc8910fce676cf6787877a786c28cdf8c38

URL: https://github.com/llvm/llvm-project/commit/1a216dc8910fce676cf6787877a786c28cdf8c38
DIFF: https://github.com/llvm/llvm-project/commit/1a216dc8910fce676cf6787877a786c28cdf8c38.diff

LOG: llvm: cmake: set CMP0114 to OLD to avoid warning

Building with cmake 3.23.2+ produces warnings when using
LLVM_ENABLE_RUNTIMES. Set this policy to the existing behavior for now
to silence the warnings.

Fixes: https://github.com/llvm/llvm-project/issues/50122
Fixes: https://github.com/llvm/llvm-project/issues/54944

Reviewed By: phosek, penzn

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

Added: 
    

Modified: 
    llvm/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 12aea913db32..1effbde06b80 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -2,6 +2,11 @@
 
 cmake_minimum_required(VERSION 3.13.4)
 
+# CMP0114: ExternalProject step targets fully adopt their steps.
+# New in CMake 3.19: https://cmake.org/cmake/help/latest/policy/CMP0114.html
+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)


        


More information about the llvm-commits mailing list