[PATCH] D49485: CMake: use new policy for CMP0051

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 18 07:27:39 PDT 2018


t.p.northover created this revision.
Herald added subscribers: mgorny, mcrosier.

I've recently started being annoyed by deprecation warnings for this CMake policy when configuring (apparently CMake 3.11.4 onwards does this) so I decided to try using the new behaviour to see what happens.

Near as I can tell nothing actually relies on the old policy. The original review (https://reviews.llvm.org/D7870) mentioned lldb, but I've built that (and everything else I can get my hands on) with both Linux & macOS and there were no extra warnings or other problems.

So, good to commit? Or does anyone know of something I should actually fix?


Repository:
  rL LLVM

https://reviews.llvm.org/D49485

Files:
  llvm/CMakeLists.txt


Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -6,12 +6,7 @@
 
 cmake_policy(SET CMP0048 NEW)
 
-# CMake 3.1 and higher include generator expressions of the form
-# $<TARGETLIB:obj> in the SOURCES property.  These need to be
-# stripped everywhere that access the SOURCES property, so we just
-# defer to the OLD behavior of not including generator expressions
-# in the output for now.
-cmake_policy(SET CMP0051 OLD)
+cmake_policy(SET CMP0051 NEW)
 
 cmake_policy(SET CMP0056 NEW)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49485.156058.patch
Type: text/x-patch
Size: 583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180718/7c0d5cf0/attachment.bin>


More information about the llvm-commits mailing list