Bug 149627 - [GTK][CMake] Warning about CMP0058
Summary: [GTK][CMake] Warning about CMP0058
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Minor
Assignee: Michael Catanzaro
Depends on:
Reported: 2015-09-29 09:15 PDT by Michael Catanzaro
Modified: 2015-09-29 12:18 PDT (History)
3 users (show)

See Also:

Patch (1.03 KB, patch)
2015-09-29 09:17 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2015-09-29 09:15:49 PDT
Since CMake 3.3:

CMake Warning (dev):
  Policy CMP0058 is not set: Ninja requires custom command byproducts to be
  explicit.  Run "cmake --help-policy CMP0058" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  This project specifies custom command DEPENDS on files in the build tree
  that are not specified as the OUTPUT or BYPRODUCTS of any
  add_custom_command or add_custom_target:


  For compatibility with versions of CMake that did not have the BYPRODUCTS
  option, CMake is generating phony rules for such files to convince 'ninja'
  to build.

  Project authors should add the missing BYPRODUCTS or OUTPUT options to the
  custom commands that produce these files.
This warning is for project developers.  Use -Wno-dev to suppress it.

There is no way to get rid of the warning using the old policy, except to stop using the file command to generate WebKit2ResourcesGResourceBundle.xml and to use a custom script to do it instead, which would be a crazy unnecessary workaround. At http://public.kitware.com/pipermail/cmake/2015-September/061672.html one of the CMake developers notes that it's safe in our case to just switch to the new policy, so let's just do that. The risk is that someone using an old CMake might in the future break the build for people using modern CMake, but that would be noticed pretty quickly....
Comment 1 Michael Catanzaro 2015-09-29 09:17:43 PDT
Created attachment 262070 [details]
Comment 2 WebKit Commit Bot 2015-09-29 12:18:51 PDT
Comment on attachment 262070 [details]

Clearing flags on attachment: 262070

Committed r190321: <http://trac.webkit.org/changeset/190321>
Comment 3 WebKit Commit Bot 2015-09-29 12:18:54 PDT
All reviewed patches have been landed.  Closing bug.