diff options
author | Dave Lee <davelee.com@gmail.com> | 2021-10-25 15:49:46 -0700 |
---|---|---|
committer | Dave Lee <davelee.com@gmail.com> | 2021-10-25 16:29:36 -0700 |
commit | 65dae8b2f20c32632e48922456a305504f4e6fbe (patch) | |
tree | c0c2c3af54bab7513b4bb7a4943deb7cbc045803 /lldb/cmake | |
parent | aa1ac2ae451e54dfa19dce2794800bbd034e2194 (diff) | |
download | llvm-65dae8b2f20c32632e48922456a305504f4e6fbe.tar.gz |
[lldb] Configure CMake policy CMP0116 for standalone builds
Using CMake >=3.20 results in many warnings about this new policy. This change silences the warnings by explicitly declaring use of the "OLD" behavior.
This applies D101083 to LLDBStandalone.cmake.
Differential Revision: https://reviews.llvm.org/D112497
Diffstat (limited to 'lldb/cmake')
-rw-r--r-- | lldb/cmake/modules/LLDBStandalone.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/cmake/modules/LLDBStandalone.cmake b/lldb/cmake/modules/LLDBStandalone.cmake index 26812f9c63f7..5be9e57f23bf 100644 --- a/lldb/cmake/modules/LLDBStandalone.cmake +++ b/lldb/cmake/modules/LLDBStandalone.cmake @@ -1,3 +1,9 @@ +# CMP0116: Ninja generators transform `DEPFILE`s from `add_custom_command()` +# New in CMake 3.20. https://cmake.org/cmake/help/latest/policy/CMP0116.html +if(POLICY CMP0116) + cmake_policy(SET CMP0116 OLD) +endif() + option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) find_package(LLVM REQUIRED CONFIG HINTS ${LLVM_DIR} NO_CMAKE_FIND_ROOT_PATH) |