[PATCH] D136572: [lld] Copy cmake_policy() to silence CMake warnings in standalone builds

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 23 21:35:17 PDT 2022


mgorny created this revision.
mgorny added reviewers: nickdesaulniers, kastiglione, compnerd, MaskRay, thesamesam, tstellar.
Herald added a subscriber: StephenFan.
Herald added a project: All.
mgorny requested review of this revision.

https://reviews.llvm.org/D136572

Files:
  lld/CMakeLists.txt


Index: lld/CMakeLists.txt
===================================================================
--- lld/CMakeLists.txt
+++ lld/CMakeLists.txt
@@ -3,6 +3,12 @@
 # If we are not building as a part of LLVM, build LLD as an
 # standalone project, using LLVM as an external library:
 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+  if(POLICY CMP0114)
+    cmake_policy(SET CMP0114 OLD)
+  endif()
+  if(POLICY CMP0116)
+    cmake_policy(SET CMP0116 OLD)
+  endif()
   project(lld)
   set(LLD_BUILT_STANDALONE TRUE)
 endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136572.470043.patch
Type: text/x-patch
Size: 527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221024/ea528212/attachment.bin>


More information about the llvm-commits mailing list