Bug 106857

Summary: Ubuntu 18.04. Fedora 27. Debian 9.4. Cmake 3.11. There is a warning during building piglit "Policy CMP0072 is not set"
Product: piglit Reporter: Denis <denys.kostin>
Component: infrastructureAssignee: Dylan Baker <baker.dylan.c>
Status: RESOLVED FIXED QA Contact: Piglit Mailing List <piglit>
Severity: minor    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Denis 2018-06-08 09:17:17 UTC
Hello. We found out that during building piglit on those specified OS's using Cmake 3.11 (and higher) - during cmake we are getting warning (provided below)

In these OS's we have package libglvnd-opengl, installed by default.
Because of it, when you are using CMake 3.11+ - you are getting warning about profile.

upd - tested with Cmake 3.10 (on the same configurations) - warning didn't exist.



CMake Warning (dev) at /usr/share/cmake/Modules/FindOpenGL.cmake:270
 (message):
   Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
   available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
   cmake_policy command to set the policy and suppress this warning.

   FindOpenGL found both a legacy GL library:

     OPENGL_gl_LIBRARY: /usr/lib64/libGL.so

   and GLVND libraries for OpenGL and GLX:

     OPENGL_opengl_LIBRARY: /usr/lib64/libOpenGL.so
     OPENGL_glx_LIBRARY: /usr/lib64/libGLX.so

   OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
   compatibility with CMake 3.10 and below the legacy GL library will be used.
 Call Stack (most recent call first):
   CMakeLists.txt:49 (find_package)
 This warning is for project developers.  Use -Wno-dev to suppress it.
Comment 1 Denis 2018-06-08 09:20:20 UTC
here is a patch for it
https://lists.freedesktop.org/archives/piglit/2018-June/024521.html
Comment 2 Denis 2018-06-08 09:22:17 UTC
I tested the patch on Fedora 27. It works as expected. I don't see the warning anymore

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.