未验证 提交 fc443517 编写于 作者: S silingtong123 提交者: GitHub

test=develop, fix the bug of tensorrt package can't compile on windows (#24860)

* test=develop, fix a bug

* test=develop, remove the macro of PADDLE_DLL_INFERENCE
上级 71fb62c2
......@@ -48,6 +48,7 @@ if(WIN32)
SET(CMAKE_C_RESPONSE_FILE_LINK_FLAG "@")
SET(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@")
add_definitions(-DPADDLE_DLL_INFERENCE)
# set definition for the dll export
if (NOT MSVC)
message(FATAL "Windows build only support msvc. Which was binded by the nvcc compiler of NVIDIA.")
......
......@@ -17,10 +17,6 @@ if(WITH_TESTING)
include(tests/test.cmake) # some generic cmake function for inference
endif()
if(WIN32)
add_definitions(-DPADDLE_DLL_INFERENCE)
endif()
# TODO(panyx0718): Should this be called paddle_fluid_inference_api_internal?
cc_library(paddle_fluid_api
SRCS io.cc
......
......@@ -17,7 +17,11 @@
#if defined(_WIN32)
#ifndef PD_INFER_DECL
#ifdef PADDLE_DLL_INFERENCE
#ifndef PADDLE_ON_INFERENCE
#define PD_INFER_DECL
#else
#define PD_INFER_DECL __declspec(dllexport)
#endif // PADDLE_ON_INFERENCE
#else
#define PD_INFER_DECL __declspec(dllimport)
#endif // PADDLE_DLL_INFERENCE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册