[llvm] [cmake] Enable color diagnostics (PR #79419)
Timm Baeder via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 00:01:25 PST 2024
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/79419
Apparently _this_ is the way to do this now (additionally to passing `-fcolor-diagnosics`?).
See https://cmake.org/cmake/help/latest/envvar/CMAKE_COLOR_DIAGNOSTICS.html.
Result:
![Screenshot from 2024-01-25 08-59-24](https://github.com/llvm/llvm-project/assets/49720664/73a67ec8-7349-4d90-a36d-f9810eef3f7b)
Nice. Colors!
>From 01ee762d52bc548b465650e71abf58abc0c4c438 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Thu, 25 Jan 2024 08:59:28 +0100
Subject: [PATCH] [cmake] Enable color diagnostics
---
llvm/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 485c76b8bb936d..c1ca4049308ecb 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -1,6 +1,7 @@
# See docs/CMake.html for instructions about how to build LLVM with CMake.
cmake_minimum_required(VERSION 3.20.0)
+set(CMAKE_COLOR_DIAGNOSTICS ON)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
More information about the llvm-commits
mailing list