mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-22 18:47:09 +01:00
[libffi] Check return value of execute_process() (#10469)
To avoid hiding errors, the return values of the execute_process() commands should be checked and a fatal error should be issued.
This commit is contained in:
commit
959a9eae9a
@ -120,8 +120,13 @@ macro(add_assembly ASMFILE)
|
||||
COMMAND ${CMAKE_C_COMPILER} /nologo /EP /I. /Iinclude /I${CMAKE_CURRENT_SOURCE_DIR}/include "${ASMFILE_FULL}"
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
OUTPUT_FILE ${ARCH_ASM_NAME}.asm
|
||||
RESULT_VARIABLE retcode
|
||||
)
|
||||
|
||||
if(NOT ${retcode} STREQUAL "0")
|
||||
message(FATAL_ERROR "Unable to assemble, exit code: '${retcode}'.")
|
||||
endif()
|
||||
|
||||
# Produced *.asm file could be just added to sources.
|
||||
# It works in x64 mode, but for some strange reason MASM returns error code when in x86,
|
||||
# (even though it didn't report any errors and correctly generated object file)
|
||||
@ -129,8 +134,13 @@ macro(add_assembly ASMFILE)
|
||||
execute_process(
|
||||
COMMAND ${ARCH_ASSEMBLER} ${ARCH_ASM_NAME}.asm
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
RESULT_VARIABLE retcode
|
||||
)
|
||||
|
||||
if(NOT ${retcode} STREQUAL "0")
|
||||
message(FATAL_ERROR "Unable to compile assembly, exit code: '${retcode}'.")
|
||||
endif()
|
||||
|
||||
list(APPEND FFI_SOURCES ${CMAKE_BINARY_DIR}/${ARCH_ASM_NAME}.obj)
|
||||
else()
|
||||
list(APPEND FFI_SOURCES ${ASMFILE})
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: libffi
|
||||
Version: 3.3-1
|
||||
Version: 3.3-2
|
||||
Homepage: https://github.com/libffi/libffi
|
||||
Description: Portable, high level programming interface to various calling conventions
|
Loading…
x
Reference in New Issue
Block a user