diff --git a/Modules/UntarFile.cmake b/Modules/UntarFile.cmake index 9f8e4df6a..df33db8d3 100644 --- a/Modules/UntarFile.cmake +++ b/Modules/UntarFile.cmake @@ -59,6 +59,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E tar ${args} ${filename} RESULT_VARIABLE rv) if(NOT rv EQUAL 0) + file(REMOVE_RECURSE "${ut_dir}") message(FATAL_ERROR "error: untar of '${filename}' failed") endif()