From f6882e2a5db77c55b5f75485b71a2686fd8a34f1 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 23 Sep 2024 23:11:08 +0200 Subject: [PATCH] Use a proper way to enable compiler diagnostics with color. --- cmake/config.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake/config.cmake b/cmake/config.cmake index 36fe3b31..94dbc92a 100644 --- a/cmake/config.cmake +++ b/cmake/config.cmake @@ -28,9 +28,6 @@ endif() if(WIN32) add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR) add_compile_options(/MP) -else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always") endif() if(EMSCRIPTEN) @@ -53,3 +50,5 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT EMSCRIPTEN) endif() file(GENERATE OUTPUT .gitignore CONTENT "*") + +set(CMAKE_COLOR_DIAGNOSTICS ON) \ No newline at end of file