[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
This commit is contained in:
Dave Lee 2020-10-16 23:02:50 -07:00
parent 5564ee495b
commit ae4fe1984f
1 changed files with 4 additions and 0 deletions

View File

@ -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}