[Lldb-commits] [PATCH] D89614: [lldb] Enable cmake policy CMP0077 for option()

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 16 23:08:10 PDT 2020


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

In lldb, explicitly set the "option() honors normal variables" CMake policy. This applies for
standalone lldb builds and matches what llvm, clang, etc do. This prevents potentially unwanted
clearing of variables like `LLVM_ENABLE_WARNINGS`, and also prevents unnecessary build warnings.

See: https://cmake.org/cmake/help/latest/policy/CMP0077.html


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89614

Files:
  lldb/CMakeLists.txt


Index: lldb/CMakeLists.txt
===================================================================
--- lldb/CMakeLists.txt
+++ lldb/CMakeLists.txt
@@ -4,6 +4,10 @@
   cmake_policy(SET CMP0075 NEW)
 endif()
 
+if(POLICY CMP0077)
+  cmake_policy(SET CMP0077 NEW)
+endif()
+
 # Add path for custom modules.
 set(CMAKE_MODULE_PATH
   ${CMAKE_MODULE_PATH}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89614.298805.patch
Type: text/x-patch
Size: 347 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201017/1896fe96/attachment.bin>


More information about the lldb-commits mailing list