gcc 4.9 fdiagnostics-color
I'm using gcc 4.9.3
and the fdiagnostics-color
switch to produce colored output warning / error messages.
It works in a simple C++ CMake project but the output of catkin_make
is not colored.
The flag is in the CMAKE_CXX_FLAGS
CMake cache:
$ cat build/CMakeCache.txt | grep CXX_FLAGS:
CMAKE_CXX_FLAGS:STRING='-fdiagnostics-color '
How do I get colored output from catkin_make
? I don't want to use colorgcc
.
Edit 1:
Using make VERBOSE=1
I can tell the flag is here:
/usr/lib/ccache/c++ -fdiagnostics-color CMakeFiles/bezier_application.dir/src/bezier_application.cpp.o -o /home/dell/MEGAsync/catkin_workspace/devel/lib/bezier_application/bezier_application -rdynamic /home/dell/MEGAsync/catkin_workspace/devel/lib/libbezier_library.so /opt/ros/indigo/lib
Note that my non-catkin projects use ccache
too and gets colored output.
Just to check what's going wrong: Try catkin_make with VERBOSE=1 to see the g++ calls and if these get passed the flag.
I edited my question to add more info. The flag is here as expected.
Try with
-fdiagnostics-color=always
. Maybe it will help.Are you running both cmake and catkin_make under the same user?
always
does not help. Yes, a non root user.