Is there any way to colour the cpplint output when setting
set(CMAKE_CXX_CPPLINT "cpplint")
in the cmake file?
Is there any way to colour the cpplint output when setting
set(CMAKE_CXX_CPPLINT "cpplint")
in the cmake file?
Copyright © 2021 Jogjafile Inc.
If you want to color any output, you have to communicate that intention to the thing that displays it. For displaying the output of commands, typically a terminal is used, nowadays in the form of terminal emulator.
If your terminal supports ANSI color escape sequences, you could just mock
cpplint
process and output a color code before and after it is run. On a *unix environment you could create an executable file namedmycpplint
with the content along:and then add that executable file location to
PATH
and doset(CMAKE_CXX_CPPLINT "mycpplint")
.