|
|
|
@ -31,7 +31,7 @@ function(copy TARGET)
|
|
|
|
|
foreach(index RANGE ${len})
|
|
|
|
|
list(GET copy_lib_SRCS ${index} src)
|
|
|
|
|
list(GET copy_lib_DSTS ${index} dst)
|
|
|
|
|
add_custom_command(TARGET ${TARGET} PRE_BUILD
|
|
|
|
|
add_custom_command(TARGET ${TARGET} PRE_BUILD
|
|
|
|
|
COMMAND mkdir -p "${dst}"
|
|
|
|
|
COMMAND cp -r "${src}" "${dst}"
|
|
|
|
|
COMMENT "copying ${src} -> ${dst}")
|
|
|
|
@ -67,6 +67,13 @@ copy(boost_lib
|
|
|
|
|
DEPS boost
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/xxhash")
|
|
|
|
|
copy(xxhash_lib
|
|
|
|
|
SRCS ${XXHASH_INCLUDE_DIR} ${XXHASH_LIBRARIES}
|
|
|
|
|
DSTS ${dst_dir} ${dst_dir}/lib
|
|
|
|
|
DEPS xxhash
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if(NOT PROTOBUF_FOUND)
|
|
|
|
|
set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/protobuf")
|
|
|
|
|
copy(protobuf_lib
|
|
|
|
@ -186,7 +193,7 @@ copy(cmake_cache
|
|
|
|
|
DSTS ${FLUID_INSTALL_DIR})
|
|
|
|
|
|
|
|
|
|
# This command generates a complete fluid library for both train and inference
|
|
|
|
|
add_custom_target(fluid_lib_dist DEPENDS ${fluid_lib_dist_dep})
|
|
|
|
|
add_custom_target(fluid_lib_dist DEPENDS ${fluid_lib_dist_dep})
|
|
|
|
|
|
|
|
|
|
# Following commands generate a inference-only fluid library
|
|
|
|
|
# third_party, version.txt and CMakeCache.txt are the same position with ${FLUID_INSTALL_DIR}
|
|
|
|
|