From 7cc4cb270fe555496627a4226b31fed19da1a82e Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Thu, 24 Jun 2021 12:38:27 -0700 Subject: [PATCH] SPEC-7488 Build failure copying 3rdparty Qt files (#1544) * changing lock * making the lock smaller --- cmake/Platform/Common/runtime_dependencies_common.cmake.in | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmake/Platform/Common/runtime_dependencies_common.cmake.in b/cmake/Platform/Common/runtime_dependencies_common.cmake.in index b49bb439f2..fcf8d75291 100644 --- a/cmake/Platform/Common/runtime_dependencies_common.cmake.in +++ b/cmake/Platform/Common/runtime_dependencies_common.cmake.in @@ -11,14 +11,11 @@ function(ly_copy source_file target_directory) get_filename_component(target_filename "${source_file}" NAME) cmake_path(COMPARE "${source_file}" EQUAL "${target_directory}/${target_filename}" same_location) if(NOT ${same_location}) - if(NOT EXISTS "${target_directory}") - file(MAKE_DIRECTORY "${target_directory}") - endif() + file(LOCK ${target_directory}/${target_filename}.lock GUARD FUNCTION TIMEOUT 300) if("${source_file}" IS_NEWER_THAN "${target_directory}/${target_filename}") file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) endif() endif() endfunction() -file(LOCK "${CMAKE_BINARY_DIR}/runtimedependencies.lock" TIMEOUT 300) @LY_COPY_COMMANDS@