Skip to content

Commit 0855d21

Browse files
committed
[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 (cherry picked from commit ae4fe19)
1 parent 9d725b5 commit 0855d21

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lldb/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ if(POLICY CMP0075)
77
cmake_policy(SET CMP0075 NEW)
88
endif()
99

10+
if(POLICY CMP0077)
11+
cmake_policy(SET CMP0077 NEW)
12+
endif()
13+
1014
# Add path for custom modules.
1115
set(CMAKE_MODULE_PATH
1216
${CMAKE_MODULE_PATH}

0 commit comments

Comments
 (0)