catkin / catkin_tools

Command line tools for working with catkin
Apache License 2.0
163 stars 146 forks source link

How to suppress warning messages when invoking catkin build "package name" #743

Closed Mechazo11 closed 1 year ago

Mechazo11 commented 1 year ago

System Info

Expected Behavior

Suppress all warning messages

Would like to know what argument I can add with the catkin build command to suppress ALL warning messages so that only error messages are printed out

Actual Behavior

A large number of unnecessary warning messages are generated. As a result, it is getting very difficult to find error messages and troubleshoot the code.

When invoking catkin build "orb_slam_3", a large number of depreciation warning is generated by the newest version of Eigen linear algebra library. I am not looking to downgrade to an older Eigen version since the warning messages are depreciation warnings and so far has not comprised functionality of the SLAM pipeline. However, with the large number of warning messages that gets printed out, it requires me to manually scroll through all of it to find the errors. This is very annoying and time consuming.

Is there any way I can suppress all the warning messages when using catkin build command?

timonegk commented 1 year ago

Catkin just prints everything cmake/make print to stderr. You can suppress warnings in cmake, either by adding add_compile_options(-w) to your CMakeLists.txt or by running catkin build with -DCMAKE_CXX_FLAGS=-w. -w is the compiler flag that suppresses warnings.

Mechazo11 commented 1 year ago

@timonegk Thanks. I will try it out and let you know if the problem is solved.

Mechazo11 commented 1 year ago

@timonegk It works thank you for the information.