From 6387a7b3ae58096a027a08f1e49ca9d149a808dc Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Mon, 19 Oct 2020 16:14:00 -0700 Subject: [PATCH] [build] Use llvm matching value for CMake policy CMP0077 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ecdbbca953913..99937910af2bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,11 @@ if(POLICY CMP0076) cmake_policy(SET CMP0076 NEW) endif() +# Don't clobber existing variable values when evaluating `option()` declarations. +if(POLICY CMP0077) + cmake_policy(SET CMP0077 NEW) +endif() + # Add path for custom CMake modules. list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")