[Lldb-commits] [lldb] 65dae8b - [lldb] Configure CMake policy CMP0116 for standalone builds

Dave Lee via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 25 16:29:54 PDT 2021


Author: Dave Lee
Date: 2021-10-25T16:29:36-07:00
New Revision: 65dae8b2f20c32632e48922456a305504f4e6fbe

URL: https://github.com/llvm/llvm-project/commit/65dae8b2f20c32632e48922456a305504f4e6fbe
DIFF: https://github.com/llvm/llvm-project/commit/65dae8b2f20c32632e48922456a305504f4e6fbe.diff

LOG: [lldb] Configure CMake policy CMP0116 for standalone builds

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 to LLDBStandalone.cmake.

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

Added: 
    

Modified: 
    lldb/cmake/modules/LLDBStandalone.cmake

Removed: 
    


################################################################################
diff  --git a/lldb/cmake/modules/LLDBStandalone.cmake b/lldb/cmake/modules/LLDBStandalone.cmake
index 26812f9c63f7c..5be9e57f23bfc 100644
--- a/lldb/cmake/modules/LLDBStandalone.cmake
+++ b/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)


        


More information about the lldb-commits mailing list