-
[Linux] gcc coloring (gcc 색 처리, warning, error, ...)카테고리 없음 2018. 12. 5. 13:38
https://stackoverflow.com/questions/14922960/is-there-an-easy-way-to-color-code-the-compiler-outputs
위 글 참고.
.bashrc에 아래와 같은 설정 추가하면 됨:
function mymake() { /usr/bin/make ${@} 2>&1 | perl -wln -M'Term::ANSIColor' -e ' m/Building|ccache|gcc|g\+\+|\bCC\b|\bcc\b/ and print "\e[1;32m", "$_", "\e[0m" or m/Error/i and print "\e[1;91m", "$_", "\e[0m" or m/warning/i and print "\e[1;93m", "$_", "\e[0m" or m/Linking|\.a\b/ and print "\e[1;36m", "$_", "\e[0m" or print; ' } alias make=mymake댓글