This is an archive of the discontinued LLVM Phabricator instance.

CMake: use new policy for CMP0051
Needs ReviewPublic

Authored by t.p.northover on Jul 18 2018, 7:26 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

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?

Diff Detail

Repository
rL LLVM

Event Timeline

t.p.northover created this revision.Jul 18 2018, 7:26 AM
labath added a subscriber: labath.Jul 18 2018, 7:57 AM

I am not sure what kinds of problems this can cause, but I can volunteer to help with the lldb side of things in case of any fallout.

MatzeB added a subscriber: MatzeB.Jul 18 2018, 1:23 PM

Looking through llvms macros I see some get_property(... SOURCES) in AddLLVM.cmake. Basically looking for entries in the list that end in a .c or .cpp suffix, which at a first glance looks like it should still work even with some generator expressions in between.

beanz added a comment.Aug 28 2018, 2:27 PM

Heh... yea, didn't notice this review. I removed the policy setting (which will default to NEW). @chapuni fixed the underlying issue that required us to have this enabled *years* ago.