mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #1617 from def-/pr-ninja-compiler-color
Add compiler colors when using ninja
This commit is contained in:
commit
3ac2e0a06a
|
@ -127,6 +127,13 @@ function(add_c_compiler_flag_if_supported VARIABLE FLAG)
|
|||
endif()
|
||||
endfunction()
|
||||
|
||||
# Force compiler colors on when using ninja. Ninja filters the colors out when
|
||||
# it's not printing to a terminal on its own.
|
||||
if(CMAKE_GENERATOR STREQUAL "Ninja")
|
||||
add_c_compiler_flag_if_supported(OUR_FLAGS -fdiagnostics-color=always)
|
||||
add_c_compiler_flag_if_supported(OUR_FLAGS -fcolor-diagnostics)
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.1 OR TARGET_OS STREQUAL "mac")
|
||||
check_cxx_compiler_flag(-std=gnu++11 FLAG_SUPPORTED_std_gnu__11)
|
||||
|
|
Loading…
Reference in a new issue