Annoying build warnings: how to suppress?
On ros melodic, catkin tools, PCL 1.8, cmake 3.20.2, g++, 10.3.0 I get this build warning when doing plane regression.
/usr/include/pcl-1.8/pcl/sample_consensus/model_types.h:99:3: warning: ‘pcl::SAC_SAMPLE_SIZE’ is deprecated: This map is deprecated and is kept only to prevent breaking existing user code. Starting from PCL 1.8.0 model sample size is a protected member of the SampleConsensusModel class [-Wdeprecated-declarations]
99 | SAC_SAMPLE_SIZE (sample_size_pairs, sample_size_pairs + sizeof (sample_size_pairs) / sizeof (SampleSizeModel));
| ^~~~~~~~~~~~~~~
It's pretty annoying. The same warning was noted back in 2016 here - the solution people found there was to manually edit the PCL source code to comment this out.
I realise I might be asking for too much, but - Is there some "reasonable" way that I can stop our project/package from emitting this specific warning?
By "reasonable" I mean - doesn't force every user to manually edit PCL source code on their computers and doesn't involve just suppressing all warnings. Maybe, for example, there is something I can add to the CMakeLists.txt or some way I can configure cmake to suppress warnings specifically from PCL but not from elsewhere?
Related: also every c++ package gives me Googletest warnings like:
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at /usr/src/googletest/CMakeLists.txt:4 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions.
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at /usr/src/googletest/googletest/CMakeLists.txt:56 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions.
Tbh this isn't really a ROS-specific question. It's more CMake or PCL or Googletest.
Those are all system dependencies, not ROS packages.
ahoj,abych nemusel idiotsky opravovat kazdy z 229 balicku,existuje uz konecne reseni globalni? dekuji za odpoved, Jacob
Please post only in English.
Gvdhoorn-> You are stupid,or cannot use translator?