diff --git a/MyxCMake/lib/DownloadContent.cmake b/MyxCMake/lib/DownloadContent.cmake index 9cd4059..259db5b 100644 --- a/MyxCMake/lib/DownloadContent.cmake +++ b/MyxCMake/lib/DownloadContent.cmake @@ -70,7 +70,11 @@ function(myx_download_content NAME) if(ENABLE_DOWNLOAD_CONTENT AND GIT_EXECUTABLE AND ARG_GIT_REPOSITORY) if(NOT IS_DIRECTORY ${WORK_DIR}) execute_process(COMMAND ${GIT_EXECUTABLE} clone ${ARG_GIT_REPOSITORY} ${NAME} - WORKING_DIRECTORY ${ARG_DOWNLOAD_DIR}) + WORKING_DIRECTORY ${ARG_DOWNLOAD_DIR} + RESULT_VARIABLE clone_result) + if(NOT clone_result EQUAL 0) + myx_message_fatal_error("Git can't clone ${NAME} from ${ARG_GIT_REPOSITORY}") + endif() else() if(ARG_AUTOFETCH) execute_process(COMMAND ${GIT_EXECUTABLE} fetch