diff --git a/CMakeLists.txt b/CMakeLists.txt index 6022d234f2e..2114ee7d90f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,7 +211,7 @@ zephyr_compile_options($) # @Intent: Set compiler specific flag for production of debug information zephyr_compile_options($) -if($ENV{ZEPHYR_BUILD_COLOUR_DIAGNOSTIC}) +if(CONFIG_COMPILER_COLOR_DIAGNOSTICS) # @Intent: Set compiler specific flag for diagnostic messages zephyr_compile_options($) endif() diff --git a/Kconfig.zephyr b/Kconfig.zephyr index 09840d9b0b2..9571d374a32 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -235,6 +235,12 @@ config NO_OPTIMIZATIONS endchoice +config COMPILER_COLOR_DIAGNOSTICS + bool "Enable colored diganostics" + default y + help + Compiler diagnostic messages are colorized. + config COMPILER_OPT string "Custom compiler options" help