Hi,

After upgrading to CMake 3.3, I'm seeing this warning when running
CMake on WebKitGTK+:

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:

   DerivedSources/webkit2gtk/WebKit2ResourcesGResourceBundle.xml

  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.


But DerivedSources/webkit2gtk/WebKit2ResourcesGResourceBundle.xml is
not generated by add_custom_command or add_custom_target, it's
generated by the file command (in
WebKit/Source/WebKit2/PlatformGTK.cmake [1]):

file(WRITE
${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.xml
    "<?xml version=1.0 encoding=UTF-8?>\n"
    "<gresources>\n"
    "    <gresource prefix=\"/org/webkitgtk/resources\">\n"
    ${WebKit2Resources}
    "    </gresource>\n"
    "</gresources>\n"
)

So there's no way to specify it as a BYPRODUCT. This seems like a
defect in CMake, unless I am missing something...? It's building fine,
so not a big deal; just would be nice to get rid of the warning.

Michael

[1] https://github.com/WebKit/webkit/blob/master/Source/WebKit2/Platfor
mGTK.cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to