aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/boost/portfile.cmake14
1 files changed, 13 insertions, 1 deletions
diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake
index d8f0a23d1..81424078e 100644
--- a/ports/boost/portfile.cmake
+++ b/ports/boost/portfile.cmake
@@ -79,7 +79,19 @@ set(B2_OPTIONS_REL
-sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib"
)
-file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
+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()
+
+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()
+
+if(EXISTS ${CURRENT_PACKAGES_DIR}/debug)
+ message(FATAL_ERROR "Error: directory exists: ${CURRENT_PACKAGES_DIR}/debug\n The previous package was not fully cleared. This is an internal error.")
+endif()
message(STATUS "Building ${TARGET_TRIPLET}-rel")
vcpkg_execute_required_process_repeat(