Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
afd75d4e
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
afd75d4e
编写于
9月 28, 2018
作者:
xiebaiyuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
suite res barry
上级
556ddfb6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
2 deletion
+41
-2
CMakeLists.txt
CMakeLists.txt
+1
-1
tools/build.sh
tools/build.sh
+29
-1
tools/toolchains/arm-linux-gnueabihf.cmake
tools/toolchains/arm-linux-gnueabihf.cmake
+11
-0
未找到文件。
CMakeLists.txt
浏览文件 @
afd75d4e
cmake_minimum_required
(
VERSION 3.
6
)
cmake_minimum_required
(
VERSION 3.
0
)
option
(
USE_OPENMP
"openmp support"
OFF
)
project
(
paddle-mobile
)
...
...
tools/build.sh
浏览文件 @
afd75d4e
...
...
@@ -92,6 +92,32 @@ build_for_android() {
make
-j
8
}
build_for_arm_linux
()
{
MODE
=
"Release"
ARM_LINUX
=
"arm-linux"
if
[
"
${#
NETS
}
"
-gt
1
]
;
then
cmake ..
\
-B
"../build/release/arm-linux"
\
-DCMAKE_BUILD_TYPE
=
"
${
MODE
}
"
\
# -DCMAKE_TOOLCHAIN_FILE="./tools/toolchains/arm-linux-gnueabihf.cmake" \
-DCMAKE_CXX_FLAGS
=
"-std=c++14 -mcpu=cortex-a53 -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations -pipe -mlittle-endian -munaligned-access"
\
-DNET
=
"
${
NETS
}
"
\
-D
"V7"
=
true
else
cmake ..
\
-B
"../build/release/arm-linux"
\
-DCMAKE_BUILD_TYPE
=
"
${
MODE
}
"
\
-DCMAKE_TOOLCHAIN_FILE
=
"./tools/toolchains/arm-linux-gnueabihf.cmake"
\
-DCMAKE_CXX_FLAGS
=
"-std=c++14 -mcpu=cortex-a53 -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations -pipe -mlittle-endian -munaligned-access"
\
-D
"V7"
=
true
fi
cd
"../build/release/arm-linux"
make
-j
8
}
build_for_ios
()
{
# rm -rf "../build"
PLATFORM
=
"ios"
...
...
@@ -135,7 +161,7 @@ if [ $# -lt 1 ]; then
echo
"sample usage: ./build.sh android"
else
params
=(
$@
)
for
((
i
=
1
;
i<
$#;
i++
))
;
do
for
((
i
=
1
;
i<
$#;
i++
))
;
do
if
[
${
i
}
!=
1
]
;
then
NETS
=
$NETS
$";"
fi
...
...
@@ -162,6 +188,8 @@ else
if
[
$1
=
"android"
]
;
then
build_for_android
elif
[
$1
=
"arm_linux"
]
;
then
build_for_arm_linux
elif
[
$1
=
"ios"
]
;
then
build_for_ios
else
...
...
tools/toolchains/arm-linux-gnueabihf.cmake
0 → 100644
浏览文件 @
afd75d4e
# CMake toolchain file for building ARM software on Linux environment
set
(
CMAKE_SYSTEM_NAME Linux
)
set
(
CMAKE_SYSTEM_PROCESSOR arm
)
set
(
CMAKE_SYSTEM_VERSION 1
)
message
(
"if U build on platform . this is right."
)
set
(
CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER
)
set
(
CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY
)
set
(
CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY
)
set
(
CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY
)
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录