This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Set the CMP0114 policy
ClosedPublic

Authored by phosek on Oct 13 2021, 11:20 AM.

Details

Reviewers
smeenai
beanz
ldionne
Group Reviewers
Restricted Project
Restricted Project
Restricted Project
Summary

We may consider enabling this policy in the future, but for now just
suppress the warnings to preserve the backwards compatibility.

Diff Detail

Event Timeline

phosek created this revision.Oct 13 2021, 11:20 AM
phosek requested review of this revision.Oct 13 2021, 11:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2021, 11:20 AM
phosek updated this revision to Diff 379476.Oct 13 2021, 11:22 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 13 2021, 11:22 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript
smeenai accepted this revision.Oct 13 2021, 3:34 PM

Makes sense to stick to the old behavior (which we know to work) for now. The new behavior seemed desirable for the future, though I haven't fully understood it yet.

I'm using cmake version 3.20.3 and I don't think I've seen any warning so far. What happens on your side that prompted you to make this change?

I'm using cmake version 3.20.3 and I don't think I've seen any warning so far. What happens on your side that prompted you to make this change?

We see a lot of the following warning:

CMake Warning (dev) at /b/s/w/ir/x/w/cipd/share/cmake-3.19/Modules/ExternalProject.cmake:2240 (message):
  Policy CMP0114 is not set: ExternalProject step targets fully adopt their
  steps.  Run "cmake --help-policy CMP0114" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  ExternalProject target 'stage2' would depend on the targets for step(s)
  'really-install' under policy CMP0114, but this is being left out for
  compatibility since the policy is not set.
Call Stack (most recent call first):
  /b/s/w/ir/x/w/llvm-project/clang/CMakeLists.txt:858 (ExternalProject_Add_StepTargets)
This warning is for project developers.  Use -Wno-dev to suppress it.

Here's an example: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8833340663294366177/+/u/clang/configure/stdout

ldionne accepted this revision.Oct 15 2021, 3:28 PM

Hmm, alright. Haven't seen it yet but I don't object.

This revision is now accepted and ready to land.Oct 15 2021, 3:28 PM
ldionne closed this revision.Sep 5 2023, 2:24 PM

[Github PR transition cleanup]

I think this has been done now, I can see both being set in cmake/Modules/CMakePolicy.cmake.

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptSep 5 2023, 2:24 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a subscriber: ekilmer. · View Herald Transcript