[vcpkg_apply_patches] Check if patch was properly applied

This commit is contained in:
Alexander Karatarakis 2016-10-18 16:17:47 -07:00
parent 8fd12fed6c
commit 4488064f81

View File

@ -13,6 +13,15 @@ function(vcpkg_apply_patches)
WORKING_DIRECTORY ${_ap_SOURCE_PATH}
RESULT_VARIABLE error_code
)
if(error_code)
message(FATAL_ERROR
"Applying patch failed: ${GIT} --work-tree=. apply \"${PATCH}\" --ignore-whitespace --whitespace=nowarn --verbose\n"
"See logs for more information:\n"
" ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log\n"
" ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log\n")
endif()
message(STATUS "Applying patch ${PATCH} done")
math(EXPR PATCHNUM "${PATCHNUM}+1")
endforeach()