aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-03-21 13:30:39 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-03-21 13:30:39 -0700
commite68709efcfebf5252fe270c2eeede4e32507b518 (patch)
treea0c94802281985c050667acccdf638caf8f54911
parent95f5627b65c064d673eddce385a11a91f8309a9e (diff)
downloadvcpkg-e68709efcfebf5252fe270c2eeede4e32507b518.tar.gz
vcpkg-e68709efcfebf5252fe270c2eeede4e32507b518.zip
[boost] Add retry to deleting intermediate folders
-rw-r--r--ports/boost/portfile.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake
index 0d066629e..26c30a081 100644
--- a/ports/boost/portfile.cmake
+++ b/ports/boost/portfile.cmake
@@ -109,7 +109,12 @@ set(B2_OPTIONS_REL
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
- message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\n Files are likely in use.")
+ # It is possible for a file in this folder to be locked due to antivirus or vctip
+ execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1)
+ file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
+ if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
+ message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\n Files are likely in use.")
+ endif()
endif()
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)