From 5a9b284f49633e451ec85978ff1412b3c0987b12 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Thu, 17 Sep 2026 01:53:18 +0200 Subject: [PATCH] Enable /diagnostics:caret for MSVC MS documentation can (currently) be found here: https://learn.microsoft.com/en-us/cpp/build/reference/diagnostics-compiler-diagnostic-options?view=msvc-170 In short, this makes the Microsoft compiler place a caret ("^") under an error message that points to where (what column) in the reported line the error was encountered. This is super helpful, so let's enable it. It also makes the MS compilers error output match closer with what GCC and Clang do, so when switching compilers your error output stays roughly the same - which is nice. --- cmake/Macros.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 827904b5c..fe499a5f5 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -55,6 +55,7 @@ function(tgui_set_global_compile_flags target) /Zc:preprocessor /Zc:inline /volatile:iso + /diagnostics:caret ) if(TGUI_COMPILER_MSVC) target_compile_options(${target} PRIVATE /Zc:throwingNew)