This fixes the following build error reported when building with GCC v7. This corresponds to the compiler associated with the SlicerBuildEnvironmentslicer/buildenv-qt5-centos7:latest used to build & package Slicer application and associated extensions on Linux.
[ 50%] Building CXX object autoscoper/CMakeFiles/autoscoper.dir/src/net/Socket.cpp.o
/path/to/SlicerAutoscoperM-build/Autoscoper/autoscoper/src/net/Socket.cpp:49:10: fatal error: filesystem: No such file or directory
#include <filesystem>
^~~~~~~~~~~~
GCC v7 does not implement <filesystem> but it does have the Filesystem Technical Specification which is in <experimental/filesystem>.
This addresses the following warning setting OpenGL_GL_PREFERENCE to LEGACY and ensuring autoscoper can be used on system without the GLVND (GL Vendor-Neutral Dispatch) library.
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindOpenGL.cmake:315 (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):
autoscoper/CMakeLists.txt:1 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
List of Autoscoper changes
$ git shortlog e0453146a..60b3d6ec0 --no-merges
Jean-Christophe Fillion-Robin (3):
COMP: Fix build on system only having <experimental/filesystem>
COMP: Add FindFilesystem CMake module to detect required filesystem libraries
COMP: Initialize OpenGL_GL_PREFERENCE and pass if down to inner-build
Fix build using gcc7
This fixes the following build error reported when building with GCC v7. This corresponds to the compiler associated with the SlicerBuildEnvironment
slicer/buildenv-qt5-centos7:latest
used to build & package Slicer application and associated extensions on Linux.GCC v7 does not implement
<filesystem>
but it does have the Filesystem Technical Specification which is in<experimental/filesystem>
.References:
OpenGL_GL_PREFERENCE
This addresses the following warning setting
OpenGL_GL_PREFERENCE
toLEGACY
and ensuring autoscoper can be used on system without theGLVND
(GL Vendor-Neutral Dispatch) library.List of Autoscoper changes