[Lldb-commits] [lldb] ae4fe19 - [lldb] Enable cmake policy CMP0077 for option()

Dave Lee via lldb-commits lldb-commits at lists.llvm.org
Sat Oct 17 00:16:30 PDT 2020


Author: Dave Lee
Date: 2020-10-17T00:16:24-07:00
New Revision: ae4fe1984f0e47259b5e476a73749185cc24e1ac

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

LOG: [lldb] Enable cmake policy CMP0077 for option()

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

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

Added: 
    

Modified: 
    lldb/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
index df4442529f79..11329052d0b8 100644
--- a/lldb/CMakeLists.txt
+++ b/lldb/CMakeLists.txt
@@ -4,6 +4,10 @@ if(POLICY CMP0075)
   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}


        


More information about the lldb-commits mailing list