aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'host/cmake/Modules')
-rw-r--r--host/cmake/Modules/UHDLog.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/host/cmake/Modules/UHDLog.cmake b/host/cmake/Modules/UHDLog.cmake
index 19b4c39ef..4bc1daf13 100644
--- a/host/cmake/Modules/UHDLog.cmake
+++ b/host/cmake/Modules/UHDLog.cmake
@@ -55,6 +55,16 @@ IF(UHD_LOG_FASTPATH_DISABLE)
ADD_DEFINITIONS(-DUHD_LOG_FASTPATH_DISABLE)
ENDIF()
+IF(MSVC OR CYGWIN)
+ SET(UHD_LOG_CONSOLE_COLOR "OFF" CACHE BOOL "Enable color output on the terminal")
+ELSE()
+ SET(UHD_LOG_CONSOLE_COLOR "ON" CACHE BOOL "Enable color output on the terminal")
+ENDIF()
+
+IF(UHD_LOG_CONSOLE_COLOR)
+ ADD_DEFINITIONS(-DUHD_LOG_CONSOLE_COLOR)
+ENDIF()
+
SET(UHD_LOG_FILE "" CACHE FILE "Set UHD log file to a file in a existing directory")
IF(NOT UHD_LOG_FILE STREQUAL "")
ADD_DEFINITIONS(-DUHD_LOG_FILE=${UHD_LOG_FILE})