File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ function(copy TARGET)
31
31
foreach (index RANGE ${len} )
32
32
list (GET copy_lib_SRCS ${index} src )
33
33
list (GET copy_lib_DSTS ${index} dst )
34
- add_custom_command (TARGET ${TARGET} PRE_BUILD
34
+ add_custom_command (TARGET ${TARGET} PRE_BUILD
35
35
COMMAND mkdir -p "${dst} "
36
36
COMMAND cp -r "${src} " "${dst} "
37
37
COMMENT "copying ${src} -> ${dst} " )
@@ -67,6 +67,13 @@ copy(boost_lib
67
67
DEPS boost
68
68
)
69
69
70
+ set (dst_dir "${FLUID_INSTALL_DIR} /third_party/install/xxhash" )
71
+ copy (xxhash_lib
72
+ SRCS ${XXHASH_INCLUDE_DIR} ${XXHASH_LIBRARIES}
73
+ DSTS ${dst_dir} ${dst_dir} /lib
74
+ DEPS xxhash
75
+ )
76
+
70
77
if (NOT PROTOBUF_FOUND )
71
78
set (dst_dir "${FLUID_INSTALL_DIR} /third_party/install/protobuf" )
72
79
copy (protobuf_lib
@@ -186,7 +193,7 @@ copy(cmake_cache
186
193
DSTS ${FLUID_INSTALL_DIR} )
187
194
188
195
# This command generates a complete fluid library for both train and inference
189
- add_custom_target (fluid_lib_dist DEPENDS ${fluid_lib_dist_dep} )
196
+ add_custom_target (fluid_lib_dist DEPENDS ${fluid_lib_dist_dep} )
190
197
191
198
# Following commands generate a inference-only fluid library
192
199
# third_party, version.txt and CMakeCache.txt are the same position with ${FLUID_INSTALL_DIR}
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ include_directories("${PADDLE_LIB}")
52
52
include_directories ("${PADDLE_LIB} /third_party/install/protobuf/include" )
53
53
include_directories ("${PADDLE_LIB} /third_party/install/glog/include" )
54
54
include_directories ("${PADDLE_LIB} /third_party/install/gflags/include" )
55
- link_directories ("${PADDLE_LIB} /third_party/install/xxhash/lib " )
55
+ include_directories ("${PADDLE_LIB} /third_party/install/xxhash/include " )
56
56
if (NOT WIN32 )
57
57
include_directories ("${PADDLE_LIB} /third_party/install/snappy/include" )
58
58
include_directories ("${PADDLE_LIB} /third_party/install/snappystream/include" )
@@ -78,6 +78,7 @@ endif(NOT WIN32)
78
78
link_directories ("${PADDLE_LIB} /third_party/install/protobuf/lib" )
79
79
link_directories ("${PADDLE_LIB} /third_party/install/glog/lib" )
80
80
link_directories ("${PADDLE_LIB} /third_party/install/gflags/lib" )
81
+ link_directories ("${PADDLE_LIB} /third_party/install/xxhash/lib" )
81
82
link_directories ("${PADDLE_LIB} /paddle/lib" )
82
83
83
84
add_executable (${DEMO_NAME} ${DEMO_NAME} .cc )
@@ -108,7 +109,7 @@ if (NOT WIN32)
108
109
set (EXTERNAL_LIB "-lrt -ldl -lpthread" )
109
110
set (DEPS ${DEPS}
110
111
${MATH_LIB} ${MKLDNN_LIB}
111
- glog gflags protobuf snappystream snappy z
112
+ glog gflags protobuf snappystream snappy z xxhash
112
113
${EXTERNAL_LIB} )
113
114
else ()
114
115
set (DEPS ${DEPS}
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ include_directories("${PADDLE_LIB}")
15
15
include_directories ("${PADDLE_LIB} /third_party/install/protobuf/include" )
16
16
include_directories ("${PADDLE_LIB} /third_party/install/glog/include" )
17
17
include_directories ("${PADDLE_LIB} /third_party/install/gflags/include" )
18
+ include_directories ("${PADDLE_LIB} /third_party/install/xxhash/include" )
18
19
include_directories ("${PADDLE_LIB} /third_party/install/snappy/include" )
19
20
include_directories ("${PADDLE_LIB} /third_party/install/snappystream/include" )
20
21
include_directories ("${PADDLE_LIB} /third_party/install/zlib/include" )
@@ -27,6 +28,7 @@ link_directories("${PADDLE_LIB}/third_party/install/snappystream/lib")
27
28
link_directories ("${PADDLE_LIB} /third_party/install/protobuf/lib" )
28
29
link_directories ("${PADDLE_LIB} /third_party/install/glog/lib" )
29
30
link_directories ("${PADDLE_LIB} /third_party/install/gflags/lib" )
31
+ link_directories ("${PADDLE_LIB} /third_party/install/xxhash/lib" )
30
32
link_directories ("${PADDLE_LIB} /third_party/install/zlib/lib" )
31
33
32
34
add_executable (demo_trainer demo_trainer.cc )
@@ -62,5 +64,5 @@ target_link_libraries(demo_trainer
62
64
${ARCHIVE_END}
63
65
${MATH_LIB}
64
66
${MKLDNN_LIB}
65
- glog gflags protobuf snappystream snappy z
67
+ glog gflags protobuf snappystream snappy z xxhash
66
68
${EXTERNAL_LIB} )
You can’t perform that action at this time.
0 commit comments