mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
cmake: Limit color output to terminals
VIm's Quickfix is useless with escape sequences embedded in compiler output.
This commit is contained in:
parent
1375221c56
commit
c1da999748
@ -114,8 +114,8 @@ function(px4_add_common_flags)
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9)
|
||||
# force color for gcc > 4.9
|
||||
add_compile_options(-fdiagnostics-color=always)
|
||||
# enable color for gcc > 4.9 when stdout is terminal
|
||||
add_compile_options(-fdiagnostics-color=auto)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.3)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user