mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 23:59:08 +08:00
[vcpkg] collect error logs in logs.txt in the buildtrees folder (#22146)
* collect error logs in logs.txt in the buildtrees folder * Use global variable * rename file to error-logs-.txt and remove error: prefix in file
This commit is contained in:
parent
dd42206f86
commit
6ba505cf2c
@ -151,6 +151,7 @@ function(vcpkg_execute_build_process)
|
||||
if(NOT log_size EQUAL "0")
|
||||
file(TO_NATIVE_PATH "${log}" native_log)
|
||||
string(APPEND stringified_logs " ${native_log}\n")
|
||||
file(APPEND "${Z_VCPKG_ERROR_LOG_COLLECTION_FILE}" "${native_log}\n")
|
||||
endif()
|
||||
endforeach()
|
||||
z_vcpkg_prettify_command_line(pretty_command ${arg_COMMAND})
|
||||
|
@ -120,6 +120,7 @@ Halting portfile execution.
|
||||
if(NOT log_size EQUAL "0")
|
||||
file(TO_NATIVE_PATH "${log}" native_log)
|
||||
string(APPEND stringified_logs " ${native_log}\n")
|
||||
file(APPEND "${Z_VCPKG_ERROR_LOG_COLLECTION_FILE}" "${native_log}\n")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
@ -139,6 +139,9 @@ if(CMD MATCHES "^BUILD$")
|
||||
set(TRIPLET_SYSTEM_ARCH "${VCPKG_TARGET_ARCHITECTURE}")
|
||||
include("${SCRIPTS}/cmake/vcpkg_common_definitions.cmake")
|
||||
|
||||
set(Z_VCPKG_ERROR_LOG_COLLECTION_FILE "${CURRENT_BUILDTREES_DIR}/error-logs-${TARGET_TRIPLET}.txt")
|
||||
file(REMOVE "${Z_VCPKG_ERROR_LOG_COLLECTION_FILE}")
|
||||
|
||||
include("${CURRENT_PORT_DIR}/portfile.cmake")
|
||||
if(DEFINED PORT)
|
||||
include("${SCRIPTS}/build_info.cmake")
|
||||
|
Loading…
Reference in New Issue
Block a user