mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-19 17:14:18 +00:00
Add compiler colors when using ninja
This commit is contained in:
parent
11127f9344
commit
1d09dfa004
|
@ -127,6 +127,13 @@ function(add_c_compiler_flag_if_supported VARIABLE FLAG)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
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(NOT MSVC)
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.1 OR TARGET_OS STREQUAL "mac")
|
if(CMAKE_VERSION VERSION_LESS 3.1 OR TARGET_OS STREQUAL "mac")
|
||||||
check_cxx_compiler_flag(-std=gnu++11 FLAG_SUPPORTED_std_gnu__11)
|
check_cxx_compiler_flag(-std=gnu++11 FLAG_SUPPORTED_std_gnu__11)
|
||||||
|
|
Loading…
Reference in a new issue