提交 97ac7de2 编写于 作者: B barrierye

update cmake

上级 9bd4de1c
...@@ -19,8 +19,10 @@ project(cube-transfer Go) ...@@ -19,8 +19,10 @@ project(cube-transfer Go)
include(cmake/golang.cmake) include(cmake/golang.cmake)
ExternalGoProject_Add(rfw github.com/mipearson/rfw) ExternalGoProject_Add(rfw github.com/mipearson/rfw)
ExternalGoProject_Add(docopt-go github.com/docopt/docopt-go) ExternalGoProject_Add(docopt-go github.com/docopt/docopt-go)
ExternalGoProject_Add_With_Deps(logex github.com/Badangel/logex github.com/mipearson/rfw) add_custom_target(logex
COMMAND env GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} get github.com/Badangel/logex
DEPENDS ${rfw})
add_subdirectory(src) add_subdirectory(src)
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/conf DESTINATION ${PADDLE_SERVING_INSTALL_DIR}) install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/conf DESTINATION ${PADDLE_SERVING_INSTALL_DIR})
...@@ -19,12 +19,6 @@ function(ExternalGoProject_Add TARG) ...@@ -19,12 +19,6 @@ function(ExternalGoProject_Add TARG)
add_custom_target(${TARG} env GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} get ${ARGN}) add_custom_target(${TARG} env GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} get ${ARGN})
endfunction(ExternalGoProject_Add) endfunction(ExternalGoProject_Add)
function(ExternalGoProject_Add_With_Deps TARG DEPS)
add_custom_target(${TARG}
env GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} get ${ARGN}
DEPENDS ${DEPS})
endfunction(ExternalGoProject_Add_With_Deps)
function(add_go_executable NAME) function(add_go_executable NAME)
file(GLOB GO_SOURCE RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.go") file(GLOB GO_SOURCE RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.go")
add_custom_command(OUTPUT ${OUTPUT_DIR}/.timestamp add_custom_command(OUTPUT ${OUTPUT_DIR}/.timestamp
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册