[PATCH] D99616: [CMake] Explicitly set CMP0116 policy

Jean-Michel Gorius via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 13:22:30 PDT 2021


Kayjukh updated this revision to Diff 334260.
Kayjukh added a comment.

Check for the CMake version before setting the policy. Unknown policies cause errors during the CMake configuration phase.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99616/new/

https://reviews.llvm.org/D99616

Files:
  llvm/CMakeLists.txt


Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -4,6 +4,10 @@
 
 set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
 
+if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.20.0")
+  cmake_policy(SET CMP0116 OLD)
+endif()
+
 if(NOT DEFINED LLVM_VERSION_MAJOR)
   set(LLVM_VERSION_MAJOR 13)
 endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99616.334260.patch
Type: text/x-patch
Size: 379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210330/9afefb0e/attachment.bin>


More information about the llvm-commits mailing list