CMake: also follow CMAKE_COLOR_MAKEFILE settings

This commit is contained in:
Adriaan de Groot 2017-08-02 11:32:27 -04:00
parent 2fdccdf090
commit 8b19f672e7

View File

@ -6,6 +6,9 @@ if(NOT WIN32)
if("0" STREQUAL "$ENV{CLICOLOR_FORCE}") if("0" STREQUAL "$ENV{CLICOLOR_FORCE}")
set(_use_color OFF) set(_use_color OFF)
endif() endif()
if(NOT CMAKE_COLOR_MAKEFILE)
set(_use_color OFF)
endif()
if(_use_color) if(_use_color)
string(ASCII 27 Esc) string(ASCII 27 Esc)