From 9ae50dd07d4c912e9cb78dfc5703cba808684343 Mon Sep 17 00:00:00 2001 From: peizhilin Date: Thu, 3 Jan 2019 16:22:05 +0800 Subject: [PATCH] fix gpu buils issue on windows test=develop --- cmake/generic.cmake | 3 +++ paddle/fluid/platform/cuda_helper_test.cu | 1 + 2 files changed, 4 insertions(+) diff --git a/cmake/generic.cmake b/cmake/generic.cmake index c6fe2e970..9419ffbad 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 466bf90c6..5b605fdc9 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 -- GitLab