From b484a59c3930ba47edd61f5b88c57d928ea5dc2c Mon Sep 17 00:00:00 2001 From: Zhou Wei <52485244+zhouwei25@users.noreply.github.com> Date: Wed, 29 Jul 2020 13:20:14 +0800 Subject: [PATCH] fix copy file random fail on windows (#25731) --- paddle/fluid/pybind/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/pybind/CMakeLists.txt b/paddle/fluid/pybind/CMakeLists.txt index b98dad6093..dbc9eb065c 100644 --- a/paddle/fluid/pybind/CMakeLists.txt +++ b/paddle/fluid/pybind/CMakeLists.txt @@ -81,19 +81,19 @@ if(WITH_PYTHON) if(${CBLAS_PROVIDER} STREQUAL MKLML) add_custom_command(TARGET op_function_generator - PRE_BUILD + PRE_LINK COMMAND ${CMAKE_COMMAND} -E copy ${MKLML_SHARED_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE} COMMAND ${CMAKE_COMMAND} -E copy ${MKLML_SHARED_IOMP_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE} ) else(${CBLAS_PROVIDER} STREQUAL EXTERN_OPENBLAS) add_custom_command(TARGET op_function_generator - PRE_BUILD + PRE_LINK COMMAND ${CMAKE_COMMAND} -E copy ${OPENBLAS_SHARED_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE} ) endif() if(WITH_MKLDNN) add_custom_command(TARGET op_function_generator - PRE_BUILD + PRE_LINK COMMAND ${CMAKE_COMMAND} -E copy ${MKLDNN_SHARED_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE} ) endif() @@ -113,14 +113,14 @@ if(WITH_PYTHON) ) if(WITH_MKL) add_custom_command(TARGET op_function_generator - PRE_BUILD + PRE_LINK COMMAND ${CMAKE_COMMAND} -E copy ${MKLML_SHARED_LIB} ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E copy ${MKLML_SHARED_IOMP_LIB} ${CMAKE_CURRENT_BINARY_DIR} ) endif(WITH_MKL) if(WITH_MKLDNN) add_custom_command(TARGET op_function_generator - PRE_BUILD + PRE_LINK COMMAND ${CMAKE_COMMAND} -E copy ${MKLDNN_SHARED_LIB} ${CMAKE_CURRENT_BINARY_DIR} ) endif(WITH_MKLDNN) -- GitLab