CMakeLists.txt 890 字节
Newer Older
1 2
cmake_minimum_required(VERSION 3.0)

3
get_filename_component(PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
4
get_filename_component(PARENT_DIR ${PARENT_DIR} DIRECTORY)
5
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PARENT_DIR}/cmake")
6

7
project(cxx_go C Go)
8

9 10
include(golang)
include(flags)
11

12 13 14 15
go_library(paddle_pserver_cclient STATIC)

if(PROJ_ROOT)
  add_custom_command(OUTPUT ${PROJ_ROOT}/paddle/trainer/libpaddle_pserver_cclient.a
X
xuwei06 已提交
16 17
          COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libpaddle_pserver_cclient.h ${PROJ_ROOT}/paddle/trainer/
          COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libpaddle_pserver_cclient.a ${PROJ_ROOT}/paddle/trainer/
18 19 20 21 22
          WORKING_DIRECTORY ${PROJ_ROOT}/paddle
          DEPENDS paddle_pserver_cclient)
  add_custom_target(paddle_pserver_cclient_lib ALL DEPENDS ${PROJ_ROOT}/paddle/trainer/libpaddle_pserver_cclient.a)
endif(PROJ_ROOT)

H
Helin Wang 已提交
23
add_subdirectory(test)