mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
vcpkg_execute_build_process.cmake: Check if the exit code is a string (#28405)
Co-authored-by: Cheney-Wang <850426846@qq.com>
This commit is contained in:
parent
c30de8e136
commit
0960ce8c46
@ -53,7 +53,10 @@ function(vcpkg_execute_build_process)
|
||||
ERROR_FILE "${log_err}"
|
||||
RESULT_VARIABLE error_code
|
||||
)
|
||||
|
||||
if (NOT error_code MATCHES "^[0-9]+$")
|
||||
list(JOIN arg_COMMAND " " command)
|
||||
message(FATAL_ERROR "Failed to execute command \"${command}\" in working directory \"${arg_WORKING_DIRECTORY}\": ${error_code}")
|
||||
endif()
|
||||
if(NOT error_code EQUAL "0")
|
||||
file(READ "${log_out}" out_contents)
|
||||
file(READ "${log_err}" err_contents)
|
||||
|
Loading…
x
Reference in New Issue
Block a user