|
| 1 | +diff --git a/scripts/cmake/vcpkg_execute_build_process.cmake b/scripts/cmake/vcpkg_execute_build_process.cmake |
| 2 | +index 60fd5b587a..c8dc021af8 100644 |
| 3 | +--- a/scripts/cmake/vcpkg_execute_build_process.cmake |
| 4 | ++++ b/scripts/cmake/vcpkg_execute_build_process.cmake |
| 5 | +@@ -131,6 +131,26 @@ function(vcpkg_execute_build_process) |
| 6 | + endif() |
| 7 | + endforeach() |
| 8 | + z_vcpkg_prettify_command_line(pretty_command ${arg_COMMAND}) |
| 9 | ++ # --- Try to print error logs |
| 10 | ++ # Split the string by newline characters |
| 11 | ++ string(REGEX MATCHALL "[^\n]+" file_list ${stringified_logs}) |
| 12 | ++ |
| 13 | ++ # Iterate over the list and print content of each file |
| 14 | ++ foreach(file IN LISTS file_list) |
| 15 | ++ string(STRIP "${file}" file_stripped) |
| 16 | ++ |
| 17 | ++ # Print filename |
| 18 | ++ message(STATUS "===") |
| 19 | ++ message(STATUS "=== Build Failed. Content of ${file_stripped}:") |
| 20 | ++ |
| 21 | ++ # Read the content of the file |
| 22 | ++ file(READ ${file_stripped} file_content) |
| 23 | ++ |
| 24 | ++ # Print the content |
| 25 | ++ message(STATUS "${file_content}") |
| 26 | ++ message(STATUS "=== End of content of ${file_stripped}") |
| 27 | ++ endforeach() |
| 28 | ++ # --- |
| 29 | + message(FATAL_ERROR |
| 30 | + " Command failed: ${pretty_command}\n" |
| 31 | + " Working Directory: ${arg_WORKING_DIRECTORY}\n" |
| 32 | +diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake |
| 33 | +index 830aa409fd..90452d857b 100644 |
| 34 | +--- a/scripts/cmake/vcpkg_execute_required_process.cmake |
| 35 | ++++ b/scripts/cmake/vcpkg_execute_required_process.cmake |
| 36 | +@@ -109,6 +109,26 @@ Halting portfile execution. |
| 37 | + endforeach() |
| 38 | + |
| 39 | + z_vcpkg_prettify_command_line(pretty_command ${arg_COMMAND}) |
| 40 | ++ # --- Try to print error logs |
| 41 | ++ # Split the string by newline characters |
| 42 | ++ string(REGEX MATCHALL "[^\n]+" file_list ${stringified_logs}) |
| 43 | ++ |
| 44 | ++ # Iterate over the list and print content of each file |
| 45 | ++ foreach(file IN LISTS file_list) |
| 46 | ++ string(STRIP "${file}" file_stripped) |
| 47 | ++ |
| 48 | ++ # Print filename |
| 49 | ++ message(STATUS "===") |
| 50 | ++ message(STATUS "=== Build Failed. Content of ${file_stripped}:") |
| 51 | ++ |
| 52 | ++ # Read the content of the file |
| 53 | ++ file(READ ${file_stripped} file_content) |
| 54 | ++ |
| 55 | ++ # Print the content |
| 56 | ++ message(STATUS "${file_content}") |
| 57 | ++ message(STATUS "=== End of content of ${file_stripped}") |
| 58 | ++ endforeach() |
| 59 | ++ # --- |
| 60 | + message(FATAL_ERROR |
| 61 | + " Command failed: ${pretty_command}\n" |
| 62 | + " Working Directory: ${arg_WORKING_DIRECTORY}\n" |
0 commit comments