[Lldb-commits] [PATCH] D112497: [lldb] Configure CMake policy CMP0116 for standalone builds

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 25 15:52:08 PDT 2021


kastiglione created this revision.
kastiglione added a reviewer: JDevlieghere.
Herald added a subscriber: mgorny.
kastiglione requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

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 applies D101083 <https://reviews.llvm.org/D101083> to LLDBStandalone.cmake.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112497

Files:
  lldb/cmake/modules/LLDBStandalone.cmake


Index: lldb/cmake/modules/LLDBStandalone.cmake
===================================================================
--- lldb/cmake/modules/LLDBStandalone.cmake
+++ lldb/cmake/modules/LLDBStandalone.cmake
@@ -1,3 +1,9 @@
+# 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()
+
 option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
 
 find_package(LLVM REQUIRED CONFIG HINTS ${LLVM_DIR} NO_CMAKE_FIND_ROOT_PATH)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112497.382146.patch
Type: text/x-patch
Size: 616 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211025/66a5d357/attachment.bin>


More information about the lldb-commits mailing list