Errors and warnings highlighting for UNIX platforms (#3643)
* Errors and warnings highlighting for UNIX platforms * The option added for errors and warning highlighting enabling
This commit is contained in:
@@ -20,6 +20,7 @@ endfunction()
|
||||
set_ci_build_number()
|
||||
|
||||
include(features)
|
||||
include(message)
|
||||
|
||||
#
|
||||
# Detect target
|
||||
|
||||
23
cmake/developer_package/message.cmake
Normal file
23
cmake/developer_package/message.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
# Copyright (C) 2018-2020 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
if(UNIX AND ENABLE_ERROR_HIGHLIGHT)
|
||||
function(message)
|
||||
string(ASCII 27 ESC)
|
||||
set(RESET "${ESC}[m")
|
||||
set(RED "${ESC}[31;1m")
|
||||
set(YELLOW "${ESC}[33;1m")
|
||||
|
||||
list(GET ARGV 0 MessageType)
|
||||
if(MessageType STREQUAL FATAL_ERROR OR MessageType STREQUAL SEND_ERROR)
|
||||
list(REMOVE_AT ARGV 0)
|
||||
_message(${MessageType} "${RED}${ARGV}${RESET}")
|
||||
elseif(MessageType STREQUAL WARNING)
|
||||
list(REMOVE_AT ARGV 0)
|
||||
_message(${MessageType} "${YELLOW}${ARGV}${RESET}")
|
||||
else()
|
||||
_message("${ARGV}")
|
||||
endif()
|
||||
endfunction()
|
||||
endif()
|
||||
@@ -25,6 +25,8 @@ In case SELECTIVE_BUILD is enabled, the SELECTIVE_BUILD_STAT variable should con
|
||||
Usage: -DSELECTIVE_BUILD=ON -DSELECTIVE_BUILD_STAT=/path/*.csv" OFF
|
||||
ALLOWED_VALUES ON OFF COLLECT)
|
||||
|
||||
ie_option(ENABLE_ERROR_HIGHLIGHT "Highlight errors and warnings during compile time" OFF)
|
||||
|
||||
#
|
||||
# Process options
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user