From 52d1b4ad05d39d9f8cc7e5869ccacc1fa66bea9f Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Fri, 3 Jan 2025 11:27:26 -0500 Subject: [PATCH] CompilerId: Console error output has first try last This ensures that a user after providing custom flags will first see that attempt. Previously the compiler attempt with the user flags could have been lost due to console log buffer / scrolling support --- Modules/CMakeDetermineCompilerId.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 9c3cef67c4..93e544c5a2 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -858,7 +858,9 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT} string(APPEND _CMAKE_${lang}_COMPILER_ID_LOG "${MSG}") endif() - string(APPEND _CMAKE_DETERMINE_COMPILER_ID_BUILD_MSG "${MSG}") + # Display in reverse order so that attempts with user flags + # won't be lost due to console limits / scrollback + string(PREPEND _CMAKE_DETERMINE_COMPILER_ID_BUILD_MSG "${MSG}") # Some languages may know the correct/desired set of flags and want to fail right away if they don't work. # This is currently only used by CUDA.