diff --git a/paddle/pten/core/CMakeLists.txt b/paddle/pten/core/CMakeLists.txt index 0c5437ff6d07abf2f5b4536fd314455839807e00..f83b80fca1f480e13dfbe89c34f68cb4f4249cf9 100644 --- a/paddle/pten/core/CMakeLists.txt +++ b/paddle/pten/core/CMakeLists.txt @@ -11,6 +11,9 @@ endif() cc_library(errors SRCS errors.cc) set(pten_enforce_deps errors flags) +if(WITH_GPU) + set(pten_enforce_deps ${pten_enforce_deps} external_error_proto) +endif() cc_library(pten_enforce INTERFACE SRCS enforce.cc DEPS ${pten_enforce_deps}) cc_library(kernel_factory SRCS kernel_factory.cc DEPS pten_enforce convert_utils)