diff options
author | Brad King <brad.king@kitware.com> | 2023-01-19 18:21:28 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-01-19 18:21:36 (GMT) |
commit | 5031934fb05181eb925b81f6747feaa8ffa27787 (patch) | |
tree | a0b9164df4469a3efa333166cadf477d76a294f6 /Tests/RunCMake | |
parent | e107fd0713c93f8b7d5be54552b51b1632b34f8c (diff) | |
parent | f6ed2585e595305d4866e4128bf98e9236b6ecd2 (diff) | |
download | CMake-5031934fb05181eb925b81f6747feaa8ffa27787.zip CMake-5031934fb05181eb925b81f6747feaa8ffa27787.tar.gz CMake-5031934fb05181eb925b81f6747feaa8ffa27787.tar.bz2 |
Merge topic 'configure-log'
f6ed2585e5 Modules: Record system inspection steps in the configure log
0f688386ea Modules: Drop redundant check logging to CMakeOutput.log and CMakeError.log
ecc26f98eb UsewxWidgets: Remove leftover debugging code
874c2e1198 FindQt4: Drop outdated advice to look at CMakeError.log on failure
a80465bcad GHS: Drop debugging message from log
9199449687 CompileFeatures: Warn explicitly when feature detection binary is not found
24ccc8c3c9 CompilerId: Restore logging of failed identifications
95976514f6 Tests: Avoid using CMake{Output,Error}.log files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8089
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/CTestCommandExpandLists/multipleExpandOptions-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Configure/ErrorLogs-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/Configure/ErrorLogs.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/try_compile/CMP0128-common.cmake | 23 | ||||
-rw-r--r-- | Tests/RunCMake/try_compile/ConfigureLog-config.txt | 18 | ||||
-rw-r--r-- | Tests/RunCMake/try_compile/Inspect-config.txt | 27 | ||||
-rw-r--r-- | Tests/RunCMake/try_compile/SourceFromBadName-config.txt | 12 | ||||
-rw-r--r-- | Tests/RunCMake/try_run/ConfigureLog-config.txt | 18 |
8 files changed, 87 insertions, 18 deletions
diff --git a/Tests/RunCMake/CTestCommandExpandLists/multipleExpandOptions-stdout.txt b/Tests/RunCMake/CTestCommandExpandLists/multipleExpandOptions-stdout.txt index 55bb894..da548a6 100644 --- a/Tests/RunCMake/CTestCommandExpandLists/multipleExpandOptions-stdout.txt +++ b/Tests/RunCMake/CTestCommandExpandLists/multipleExpandOptions-stdout.txt @@ -1,2 +1 @@ -- Configuring incomplete, errors occurred! -See also ".*/Tests/RunCMake/CTestCommandExpandLists/multipleExpandOptions-build/CMakeFiles/CMakeOutput\.log". diff --git a/Tests/RunCMake/Configure/ErrorLogs-stderr.txt b/Tests/RunCMake/Configure/ErrorLogs-stderr.txt index 4eee45d..ec8c8c2 100644 --- a/Tests/RunCMake/Configure/ErrorLogs-stderr.txt +++ b/Tests/RunCMake/Configure/ErrorLogs-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at ErrorLogs.cmake:3 \(message\): +CMake Error at ErrorLogs.cmake:[0-9]+ \(message\): Some error! Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/Configure/ErrorLogs.cmake b/Tests/RunCMake/Configure/ErrorLogs.cmake index e8cf062..3a9d107 100644 --- a/Tests/RunCMake/Configure/ErrorLogs.cmake +++ b/Tests/RunCMake/Configure/ErrorLogs.cmake @@ -1,3 +1,5 @@ +file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Some detailed output information!\n") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Some detailed error information!\n") message(SEND_ERROR "Some error!") diff --git a/Tests/RunCMake/try_compile/CMP0128-common.cmake b/Tests/RunCMake/try_compile/CMP0128-common.cmake index 0b8a12b..64b1a77 100644 --- a/Tests/RunCMake/try_compile/CMP0128-common.cmake +++ b/Tests/RunCMake/try_compile/CMP0128-common.cmake @@ -1,10 +1,6 @@ cmake_policy(SET CMP0067 NEW) enable_language(CXX) -# Isolate the one try_compile below in the error log. -set(CMakeError_log "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log") -file(REMOVE "${CMakeError_log}") - # Add our own -std= flag to the try_compile check. set(CMAKE_REQUIRED_FLAGS -std=c++11) @@ -24,8 +20,21 @@ int main() } " SRC_COMPILED) if(NOT SRC_COMPILED) - if(EXISTS "${CMakeError_log}") - file(READ "${CMakeError_log}" err_log) + message("Check failed to compile:") + set(configure_log "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeConfigureLog.yaml") + if(EXISTS "${configure_log}") + file(READ "${configure_log}" log_content) + else() + set(log_content "") + endif() + if(log_content MATCHES [[( - + kind: "try_compile-v1"( ++ [^ +]+)+ + checks: + - "Performing Test SRC_COMPILED"( ++ [^ +]+)+)]]) + message("${configure_log} contains:\n${CMAKE_MATCH_1}") endif() - message("${err_log}") endif() diff --git a/Tests/RunCMake/try_compile/ConfigureLog-config.txt b/Tests/RunCMake/try_compile/ConfigureLog-config.txt index 262ed3c..1f848bf 100644 --- a/Tests/RunCMake/try_compile/ConfigureLog-config.txt +++ b/Tests/RunCMake/try_compile/ConfigureLog-config.txt @@ -1,6 +1,13 @@ ^ --- -events: +events:( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)+ - kind: "try_compile-v1" backtrace: @@ -17,7 +24,14 @@ events: variable: "CMAKE_C_ABI_COMPILED" cached: true stdout: \|.* - exitCode: 0 + exitCode: 0( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)* - kind: "try_compile-v1" backtrace: diff --git a/Tests/RunCMake/try_compile/Inspect-config.txt b/Tests/RunCMake/try_compile/Inspect-config.txt index e09fe55..7a39335 100644 --- a/Tests/RunCMake/try_compile/Inspect-config.txt +++ b/Tests/RunCMake/try_compile/Inspect-config.txt @@ -1,6 +1,13 @@ ^ --- -events: +events:( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)+ - kind: "try_compile-v1" backtrace: @@ -17,7 +24,14 @@ events: variable: "CMAKE_C_ABI_COMPILED" cached: true stdout: \|.* - exitCode: 0 + exitCode: 0( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)+ - kind: "try_compile-v1" backtrace: @@ -34,5 +48,12 @@ events: variable: "CMAKE_CXX_ABI_COMPILED" cached: true stdout: \|.* - exitCode: 0 + exitCode: 0( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)* \.\.\.$ diff --git a/Tests/RunCMake/try_compile/SourceFromBadName-config.txt b/Tests/RunCMake/try_compile/SourceFromBadName-config.txt index 10f3293..cb76565 100644 --- a/Tests/RunCMake/try_compile/SourceFromBadName-config.txt +++ b/Tests/RunCMake/try_compile/SourceFromBadName-config.txt @@ -1 +1,11 @@ -^$ +^ +--- +events:( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)+ +\.\.\.$ diff --git a/Tests/RunCMake/try_run/ConfigureLog-config.txt b/Tests/RunCMake/try_run/ConfigureLog-config.txt index ba396e0..bf3c3bd 100644 --- a/Tests/RunCMake/try_run/ConfigureLog-config.txt +++ b/Tests/RunCMake/try_run/ConfigureLog-config.txt @@ -1,6 +1,13 @@ ^ --- -events: +events:( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)+ - kind: "try_compile-v1" backtrace: @@ -16,7 +23,14 @@ events: variable: "CMAKE_C_ABI_COMPILED" cached: true stdout: \|.* - exitCode: 0 + exitCode: 0( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)* - kind: "try_run-v1" backtrace: |