aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-03-21 13:34:21 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-03-21 13:34:21 -0700
commita1c72e3e7d662ca584558e2aa4069e58d9b66cbf (patch)
tree4d1ed982cbc41389cb1dae723d47ab382f504077
parente68709efcfebf5252fe270c2eeede4e32507b518 (diff)
downloadvcpkg-a1c72e3e7d662ca584558e2aa4069e58d9b66cbf.tar.gz
vcpkg-a1c72e3e7d662ca584558e2aa4069e58d9b66cbf.zip
[boost] Add retry to deleting _debug_ 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 26c30a081..ab8d84667 100644
--- a/ports/boost/portfile.cmake
+++ b/ports/boost/portfile.cmake
@@ -119,7 +119,12 @@ endif()
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
- message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg\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}-dbg)
+ if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
+ message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg\n Files are likely in use.")
+ endif()
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug)