mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
build: use -fdiagnostics-color=always with Ninja (#10419)
"auto" does not work, since Ninja does not appear as a TTY to gcc/clang, but handles stripping escape codes itself when output is not to a TTY. Ref: https://github.com/ninja-build/ninja/blob/ca041d88f4d6/src/build.cc#L158-L169
This commit is contained in:
parent
05a17e419a
commit
0c639e8777
@ -315,7 +315,11 @@ endif()
|
||||
|
||||
check_c_compiler_flag(-fdiagnostics-color=auto HAS_DIAG_COLOR_FLAG)
|
||||
if(HAS_DIAG_COLOR_FLAG)
|
||||
add_compile_options(-fdiagnostics-color=auto)
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
add_compile_options(-fdiagnostics-color=always)
|
||||
else()
|
||||
add_compile_options(-fdiagnostics-color=auto)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
|
Loading…
Reference in New Issue
Block a user