From 8a9f06e62d3b0df42cfb4954874175a287050d5f Mon Sep 17 00:00:00 2001 From: Zhou Wei <52485244+zhouwei25@users.noreply.github.com> Date: Mon, 1 Jun 2020 13:14:43 +0800 Subject: [PATCH] fix bug when compile CPU inference library (#24800) --- cmake/inference_lib.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index ff8e8a9ff9..8c2549cc05 100644 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -234,7 +234,11 @@ copy(fluid_lib_dist ) set(module "platform") -set(platform_lib_deps profiler_proto error_codes_proto cuda_error_proto) +set(platform_lib_deps profiler_proto error_codes_proto) +if(WITH_GPU) + set(platform_lib_deps ${platform_lib_deps} cuda_error_proto) +endif(WITH_GPU) + add_dependencies(fluid_lib_dist ${platform_lib_deps}) copy(fluid_lib_dist SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/dynload/*.h ${src_dir}/${module}/details/*.h ${PADDLE_BINARY_DIR}/paddle/fluid/platform/*.pb.h -- GitLab