This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Remove dead code setting policies to NEW
ClosedPublic

Authored by tambre on Jan 10 2021, 4:18 AM.

Details

Reviewers
phosek
lebedev.ri
ldionne
Group Reviewers
Restricted Project
Restricted Project
Restricted Project
Commits
rG480643a95cd1: [CMake] Remove dead code setting policies to NEW
Summary

cmake_minimum_required(VERSION) calls cmake_policy(VERSION),
which sets all policies up to VERSION to NEW.
LLVM started requiring CMake 3.13 last year, so we can remove
a bunch of code setting policies prior to 3.13 to NEW as it
no longer has any effect.

Diff Detail

Event Timeline

tambre created this revision.Jan 10 2021, 4:18 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript
tambre requested review of this revision.Jan 10 2021, 4:18 AM
Herald added projects: Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptJan 10 2021, 4:18 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added subscribers: llvm-commits, lldb-commits, Restricted Project and 3 others. · View Herald Transcript
phosek accepted this revision.Jan 10 2021, 11:30 PM

LGTM

ldionne: for libc++ review

ldionne requested changes to this revision.Jan 11 2021, 8:52 AM

Except for the google-benchmark nit, LGTM. Thanks a lot for the cleanup!

libcxx/utils/google-benchmark/CMakeLists.txt
3

I don't think we want to change this. It's a third-party project (which is inconveniently checked-in as-is into our tree..).

This revision now requires changes to proceed.Jan 11 2021, 8:52 AM
tambre updated this revision to Diff 315847.Jan 11 2021, 10:00 AM

Don't modify third-party checked-in libraries.

tambre marked an inline comment as done.Jan 11 2021, 10:03 AM
tambre added inline comments.
libcxx/utils/google-benchmark/CMakeLists.txt
3

Good catch. Did the same for llvm/utils/benchmark/CMakeLists.txt, though that one seems to have the cmake_minimum_required(VERSION) updated to 3.13.4 unlike this one.

tambre marked an inline comment as done.Jan 17 2021, 11:42 PM

ldionne: ping

ldionne accepted this revision.Jan 18 2021, 9:06 AM

Thanks!

This revision is now accepted and ready to land.Jan 18 2021, 9:06 AM
This revision was automatically updated to reflect the committed changes.