Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
a7edafc4
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a7edafc4
编写于
5月 18, 2017
作者:
L
liaogang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add cc_test
上级
00441a90
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
16 deletion
+15
-16
cmake/CMakeDetermineGoCompiler.cmake
cmake/CMakeDetermineGoCompiler.cmake
+6
-4
cmake/generic.cmake
cmake/generic.cmake
+3
-2
paddle/CMakeLists.txt
paddle/CMakeLists.txt
+1
-1
paddle/go/CMakeLists.txt
paddle/go/CMakeLists.txt
+5
-9
未找到文件。
cmake/CMakeDetermineGoCompiler.cmake
浏览文件 @
a7edafc4
...
...
@@ -28,10 +28,12 @@ if(NOT CMAKE_Go_COMPILER)
NAMES go
PATHS
${
Go_BIN_PATH
}
)
EXEC_PROGRAM
(
${
CMAKE_Go_COMPILER
}
ARGS version OUTPUT_VARIABLE GOLANG_VERSION
)
STRING
(
REGEX MATCH
"go[0-9]+.[0-9]+.[0-9]+[ /A-Za-z0-9]*"
VERSION
"
${
GOLANG_VERSION
}
"
)
message
(
"-- The Golang compiler identification is
${
VERSION
}
"
)
message
(
"-- Check for working Golang compiler:
${
CMAKE_Go_COMPILER
}
"
)
if
(
CMAKE_Go_COMPILER
)
EXEC_PROGRAM
(
${
CMAKE_Go_COMPILER
}
ARGS version OUTPUT_VARIABLE GOLANG_VERSION
)
STRING
(
REGEX MATCH
"go[0-9]+[.0-9]*[ /A-Za-z0-9]*"
VERSION
"
${
GOLANG_VERSION
}
"
)
message
(
"-- The Golang compiler identification is
${
VERSION
}
"
)
message
(
"-- Check for working Golang compiler:
${
CMAKE_Go_COMPILER
}
"
)
endif
()
endif
()
endif
()
...
...
cmake/generic.cmake
浏览文件 @
a7edafc4
...
...
@@ -163,8 +163,9 @@ function(go_library TARGET_NAME)
WORKING_DIRECTORY
${
CMAKE_CURRENT_LIST_DIR
}
)
add_custom_target
(
${
TARGET_NAME
}
_lib ALL DEPENDS
${
TARGET_NAME
}
_timestamp
${
go_library_DEPS
}
)
add_library
(
${
TARGET_NAME
}
STATIC IMPORTED
)
set_target_properties
(
${
TARGET_NAME
}
PROPERTIES
IMPORTED_LOCATION
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
LIB_NAME
}
)
set_property
(
TARGET
${
TARGET_NAME
}
PROPERTY
IMPORTED_LOCATION
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
LIB_NAME
}
"
)
add_dependencies
(
${
TARGET_NAME
}
${
TARGET_NAME
}
_lib
)
endfunction
(
go_library
)
function
(
go_binary TARGET_NAME
)
...
...
paddle/CMakeLists.txt
浏览文件 @
a7edafc4
...
...
@@ -9,7 +9,7 @@ add_subdirectory(pserver)
add_subdirectory
(
trainer
)
add_subdirectory
(
scripts
)
if
(
${
CMAKE_Go_COMPILER
}
)
if
(
CMAKE_Go_COMPILER
)
add_subdirectory
(
go
)
endif
()
...
...
paddle/go/CMakeLists.txt
浏览文件 @
a7edafc4
...
...
@@ -2,12 +2,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
go_library
(
adder SRCS adder.go
)
# cc_test(cgo_test
# SRCS
# cgo_test.cc
# DEPS
# adder)
add_executable
(
cgo_test cgo_test.cc
)
add_dependencies
(
cgo_test adder
)
target_link_libraries
(
cgo_test
${
GTEST_LIBRARIES
}
${
GTEST_MAIN_LIBRARIES
}
adder
)
add_test
(
cgo_test cgo_test
)
cc_test
(
cgo_test
SRCS
cgo_test.cc
DEPS
adder
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录