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