Skip to content

Commit f06f4df

Browse files
backyesreyoung
authored andcommitted
py_paddle link zlib(#393)
1 parent a07da94 commit f06f4df

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

paddle/api/paddle_api_config.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
PADDLE_BUILD_DIR="@CMAKE_CURRENT_BINARY_DIR@/../"
22
WITH_GPU="@WITH_GPU@"
33
PROTOBUF_LIB="@PROTOBUF_LIBRARY@"
4+
ZLIB_LIB="@ZLIB_LIBRARIES@"
45
CMAKE_THREAD_LIB="@CMAKE_THREAD_LIBS_INIT@"
56
CMAKE_DL_LIBS="@CMAKE_DL_LIBS@"
67

paddle/api/paddle_ld_flags.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def __init__(self):
3838
self.paddle_build_dir = os.path.abspath(self.paddle_build_dir)
3939
self.with_gpu = PaddleLDFlag.cmake_bool(WITH_GPU)
4040
self.protolib = PROTOBUF_LIB
41+
self.zlib = ZLIB_LIB
4142
self.thread = CMAKE_THREAD_LIB
4243
self.dl_libs = CMAKE_DL_LIBS
4344
self.with_python = PaddleLDFlag.cmake_bool(WITH_PYTHON)
@@ -64,7 +65,7 @@ def libs_dir_str(self):
6465

6566
def parent_dir_str(self):
6667
libdirs = PARENT_LIB_DIRS
67-
return " ".join(map(lambda x: "-L" + os.path.join(self.paddle_build_dir, '..', x),
68+
return " ".join(map(lambda x: "-L" + os.path.join(self.paddle_build_dir, '..', x),
6869
libdirs))
6970

7071
def libs_str(self):
@@ -82,6 +83,7 @@ def libs_str(self):
8283
"-lpaddle_cuda",
8384
"-lpaddle_api",
8485
self.normalize_flag(self.protolib),
86+
self.normalize_flag(self.zlib),
8587
self.normalize_flag(self.thread),
8688
self.normalize_flag(self.dl_libs),
8789
self.normalize_flag(self.cblas_libs),

0 commit comments

Comments
 (0)