-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2583 from gangliao/go_generic
FIX: Polish go library
- Loading branch information
Showing
10 changed files
with
48 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,3 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
|
||
get_filename_component(PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY) | ||
get_filename_component(PARENT_DIR ${PARENT_DIR} DIRECTORY) | ||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PARENT_DIR}/cmake") | ||
|
||
project(cxx_go C Go) | ||
|
||
include(golang) | ||
include(flags) | ||
|
||
go_library(paddle_pserver_cclient STATIC) | ||
|
||
add_subdirectory(test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,3 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
|
||
add_executable(main main.c) | ||
add_dependencies(main paddle_pserver_cclient) | ||
add_executable(test_cclient test_cclient.c) | ||
add_dependencies(test_cclient paddle_pserver_cclient) | ||
|
||
if(APPLE) | ||
set(CMAKE_EXE_LINKER_FLAGS "-framework CoreFoundation -framework Security") | ||
else() | ||
set(CMAKE_EXE_LINKER_FLAGS "-pthread") | ||
endif() | ||
|
||
if(PROJ_ROOT) | ||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/..) | ||
target_link_libraries(main ${CMAKE_CURRENT_BINARY_DIR}/../libpaddle_pserver_cclient.a pthread) | ||
target_link_libraries(test_cclient ${CMAKE_CURRENT_BINARY_DIR}/../libpaddle_pserver_cclient.a pthread) | ||
else(PROJ_ROOT) | ||
include_directories(${CMAKE_BINARY_DIR}) | ||
target_link_libraries(main ${CMAKE_BINARY_DIR}/libpaddle_pserver_cclient.a pthread) | ||
target_link_libraries(test_cclient ${CMAKE_BINARY_DIR}/libpaddle_pserver_cclient.a pthread) | ||
endif(PROJ_ROOT) | ||
cc_library(main SRCS main.c DEPS paddle_pserver_cclient) | ||
cc_test(test_cclient SRCS test_cclient.c DEPS paddle_pserver_cclient) |