Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Complain if a client binary API queue is full
[vpp.git]
/
src
/
cmake
/
message.cmake
diff --git
a/src/cmake/message.cmake
b/src/cmake/message.cmake
index
fb740fd
..
c1e16bf
100644
(file)
--- a/
src/cmake/message.cmake
+++ b/
src/cmake/message.cmake
@@
-16,10
+16,12
@@
##############################################################################
function(message)
list(GET ARGV 0 type)
##############################################################################
function(message)
list(GET ARGV 0 type)
- string(ASCII 27 esc)
- set(red "${esc}[1;31m")
- set(yellow "${esc}[1;33m")
- set(reset "${esc}[m")
+ if("$ENV{TERM}" STREQUAL "xterm-256color")
+ string(ASCII 27 esc)
+ set(red "${esc}[1;31m")
+ set(yellow "${esc}[1;33m")
+ set(reset "${esc}[m")
+ endif()
if(type STREQUAL FATAL_ERROR OR type STREQUAL SEND_ERROR)
list(REMOVE_AT ARGV 0)
_message(${type} "${red}${ARGV}${reset}")
if(type STREQUAL FATAL_ERROR OR type STREQUAL SEND_ERROR)
list(REMOVE_AT ARGV 0)
_message(${type} "${red}${ARGV}${reset}")
@@
-38,10
+40,11
@@
endfunction()
# aligned config output
##############################################################################
function(pr desc val)
# aligned config output
##############################################################################
function(pr desc val)
- string(ASCII 27 esc)
- set(reset "${esc}[m")
- set(cyan "${esc}[36m")
-
+ if("$ENV{TERM}" STREQUAL "xterm-256color")
+ string(ASCII 27 esc)
+ set(reset "${esc}[m")
+ set(cyan "${esc}[36m")
+ endif()
string(LENGTH ${desc} len)
while (len LESS 20)
set (desc "${desc} ")
string(LENGTH ${desc} len)
while (len LESS 20)
set (desc "${desc} ")