change the lock to avoid the "IS_NEWER_THAN" check from failing in race conditions

This commit is contained in:
pappeste
2021-06-17 12:44:49 -07:00
parent 5e64586030
commit 808d31ea32
@@ -19,10 +19,10 @@ function(ly_copy source_file target_directory)
file(MAKE_DIRECTORY "${target_directory}")
endif()
if("${source_file}" IS_NEWER_THAN "${target_directory}/${target_filename}")
file(LOCK "${CMAKE_BINARY_DIR}/runtimedependencies.lock" GUARD FUNCTION TIMEOUT 30)
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@