Modules: Record system inspection steps in the configure log

Replace old-style `file(APPEND .../CMake{Output,Error}.log)` logging
with calls to `message(CONFIGURE_LOG)` to record the steps in the
`CMakeConfigureLog.yaml` configure log instead.

Issue: #23200
This commit is contained in:
Brad King
2023-01-16 14:41:19 -05:00
parent 0f688386ea
commit f6ed2585e5
17 changed files with 126 additions and 57 deletions

View File

@@ -51,7 +51,7 @@ function(CMAKE_TRY_COMPILER_OR_LINKER_FLAG lang flag result)
if (NOT lang MATCHES "^(C|CXX|Fortran|ASM)$")
# other possible languages are not supported
# log message to keep trace of this problem...
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
message(CONFIGURE_LOG
"Function 'CMAKE_CHECK_COMPILER_FLAG' called with unsupported language: ${lang}\n")
set(${result} FALSE CACHE INTERNAL ${comment})
return()
@@ -144,7 +144,7 @@ function(CMAKE_TRY_COMPILER_OR_LINKER_FLAG lang flag result)
endforeach()
endif()
if (DEFINED ${result})
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
message(CONFIGURE_LOG
"Determining if the ${flag} option "
"is supported for ${lang} language failed with the following output:\n"
"${COMPILER_FLAG_OUTPUT}\n")