Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
93e4d0cc
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
93e4d0cc
编写于
11月 05, 2016
作者:
B
backyes
提交者:
Yu Yang
11月 05, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
using find_package for swig (#334)
上级
744dba4a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
2 addition
and
23 deletion
+2
-23
CMakeLists.txt
CMakeLists.txt
+2
-1
cmake/swig.cmake
cmake/swig.cmake
+0
-22
未找到文件。
CMakeLists.txt
浏览文件 @
93e4d0cc
...
@@ -9,7 +9,7 @@ set(PADDLE_VERSION ${PADDLE_MAJOR_VERSION}.${PADDLE_MINOR_VERSION}.${PADDLE_PATC
...
@@ -9,7 +9,7 @@ set(PADDLE_VERSION ${PADDLE_MAJOR_VERSION}.${PADDLE_MINOR_VERSION}.${PADDLE_PATC
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_SOURCE_DIR
}
/cmake"
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_SOURCE_DIR
}
/cmake"
)
set
(
PROJ_ROOT
${
CMAKE_SOURCE_DIR
}
)
set
(
PROJ_ROOT
${
CMAKE_SOURCE_DIR
}
)
include
(
package
)
include
(
package
)
include
(
swig
)
find_package
(
SWIG 2.0
)
find_package
(
CUDA QUIET
)
find_package
(
CUDA QUIET
)
find_package
(
Protobuf REQUIRED
)
find_package
(
Protobuf REQUIRED
)
find_package
(
PythonLibs 2.7 REQUIRED
)
find_package
(
PythonLibs 2.7 REQUIRED
)
...
@@ -60,6 +60,7 @@ include(flags)
...
@@ -60,6 +60,7 @@ include(flags)
include
(
cudnn
)
include
(
cudnn
)
include
(
FindPythonModule
)
include
(
FindPythonModule
)
include
(
check_packages
)
include
(
check_packages
)
include
(
swig
)
include
(
coveralls
)
include
(
coveralls
)
# add PaddlePaddle version
# add PaddlePaddle version
...
...
cmake/swig.cmake
浏览文件 @
93e4d0cc
find_program
(
SWIG_BINARY_PATH
swig
)
if
(
${
SWIG_BINARY_PATH
}
STREQUAL
"SWIG_BINARY_PATH-NOTFOUND"
)
set
(
SWIG_FOUND OFF
)
else
()
set
(
SWIG_FOUND ON
)
endif
()
set
(
MIN_SWIG_VERSION 2
)
if
(
SWIG_FOUND
)
execute_process
(
COMMAND sh -c
"
${
SWIG_BINARY_PATH
}
-version | grep Version | cut -f3 -d' '"
OUTPUT_VARIABLE _SWIG_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if
(
${
_SWIG_VERSION
}
VERSION_LESS
${
MIN_SWIG_VERSION
}
)
message
(
"swig version
${
MIN_SWIG_VERSION
}
or greater is needed for generating python api. "
"Only version
${
_SWIG_VERSION
}
is found. Set SWIG_FOUND to FALSE"
)
set
(
SWIG_FOUND FALSE
)
endif
(
${
_SWIG_VERSION
}
VERSION_LESS
${
MIN_SWIG_VERSION
}
)
endif
(
SWIG_FOUND
)
function
(
generate_python_api target_name
)
function
(
generate_python_api target_name
)
add_custom_command
(
OUTPUT
${
PROJ_ROOT
}
/paddle/py_paddle/swig_paddle.py
add_custom_command
(
OUTPUT
${
PROJ_ROOT
}
/paddle/py_paddle/swig_paddle.py
${
PROJ_ROOT
}
/paddle/Paddle_wrap.cxx
${
PROJ_ROOT
}
/paddle/Paddle_wrap.cxx
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录