From 97ac7de273ac15533f9cf2e5ee504ccaa74a8378 Mon Sep 17 00:00:00 2001 From: barrierye Date: Fri, 10 Apr 2020 18:16:29 +0800 Subject: [PATCH] update cmake --- core/cube/cube-transfer/CMakeLists.txt | 6 ++++-- core/cube/cube-transfer/cmake/golang.cmake | 6 ------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/core/cube/cube-transfer/CMakeLists.txt b/core/cube/cube-transfer/CMakeLists.txt index dfe544d2..7aab8bed 100644 --- a/core/cube/cube-transfer/CMakeLists.txt +++ b/core/cube/cube-transfer/CMakeLists.txt @@ -19,8 +19,10 @@ project(cube-transfer Go) include(cmake/golang.cmake) ExternalGoProject_Add(rfw github.com/mipearson/rfw) -ExternalGoProject_Add(docopt-go github.com/docopt/docopt-go) -ExternalGoProject_Add_With_Deps(logex github.com/Badangel/logex github.com/mipearson/rfw) +ExternalGoProject_Add(docopt-go github.com/docopt/docopt-go) +add_custom_target(logex + COMMAND env GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} get github.com/Badangel/logex + DEPENDS ${rfw}) add_subdirectory(src) install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/conf DESTINATION ${PADDLE_SERVING_INSTALL_DIR}) diff --git a/core/cube/cube-transfer/cmake/golang.cmake b/core/cube/cube-transfer/cmake/golang.cmake index 2dbfc740..5a26c5d2 100644 --- a/core/cube/cube-transfer/cmake/golang.cmake +++ b/core/cube/cube-transfer/cmake/golang.cmake @@ -19,12 +19,6 @@ function(ExternalGoProject_Add TARG) add_custom_target(${TARG} env GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} get ${ARGN}) 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) file(GLOB GO_SOURCE RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.go") add_custom_command(OUTPUT ${OUTPUT_DIR}/.timestamp -- GitLab