diff --git a/cmake/generic.cmake b/cmake/generic.cmake index c6fe2e970d3e02985e3f2b8d5df6a7358beed514..9419ffbad0921e9a6634071c2052cbe3b19a324c 100644 --- a/cmake/generic.cmake +++ b/cmake/generic.cmake @@ -447,6 +447,9 @@ function(nv_test TARGET_NAME) set(multiValueArgs SRCS DEPS) cmake_parse_arguments(nv_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) cuda_add_executable(${TARGET_NAME} ${nv_test_SRCS}) + if(WIN32) + list(APPEND nv_test_DEPS shlwapi) + endif(WIN32) target_link_libraries(${TARGET_NAME} ${nv_test_DEPS} paddle_gtest_main lod_tensor memory gtest gflags glog) add_dependencies(${TARGET_NAME} ${nv_test_DEPS} paddle_gtest_main lod_tensor memory gtest gflags glog) common_link(${TARGET_NAME}) diff --git a/paddle/fluid/platform/cuda_helper_test.cu b/paddle/fluid/platform/cuda_helper_test.cu index 466bf90c63c1496883995819cdcb19f846e4a302..5b605fdc964851dd3ef90d2f84b20bdc247c6f2d 100644 --- a/paddle/fluid/platform/cuda_helper_test.cu +++ b/paddle/fluid/platform/cuda_helper_test.cu @@ -15,6 +15,7 @@ #include #include #include +#include #include #define PADDLE_CUDA_FP16