Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
7c7651f3
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7c7651f3
编写于
5月 17, 2018
作者:
R
Ruilong Liu
提交者:
GitHub
5月 17, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into develop
上级
0e1891e5
9349e827
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
17 deletion
+17
-17
CMakeLists.txt
CMakeLists.txt
+15
-15
build.sh
build.sh
+2
-2
未找到文件。
CMakeLists.txt
浏览文件 @
7c7651f3
...
@@ -16,20 +16,20 @@ file(GLOB_RECURSE PADDLE_MOBILE_H src/*.h)
...
@@ -16,20 +16,20 @@ file(GLOB_RECURSE PADDLE_MOBILE_H src/*.h)
# include headers
# include headers
include_directories
(
src/
)
include_directories
(
src/
)
include
(
ExternalProject
)
#
include(ExternalProject)
ExternalProject_Add
(
openblas_proj
#
ExternalProject_Add(openblas_proj
GIT_REPOSITORY
"https://github.com/xianyi/OpenBLAS.git"
#
GIT_REPOSITORY "https://github.com/xianyi/OpenBLAS.git"
GIT_TAG
"v0.2.20"
#
GIT_TAG "v0.2.20"
SOURCE_DIR
"openblas/"
#
SOURCE_DIR "openblas/"
BUILD_IN_SOURCE 1
#
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND
""
#
CONFIGURE_COMMAND ""
BUILD_COMMAND
"make"
"ONLY_CBLAS=1"
#
BUILD_COMMAND "make" "ONLY_CBLAS=1"
INSTALL_COMMAND
"make"
"PREFIX=
${
CMAKE_BINARY_DIR
}
/"
"install"
#
INSTALL_COMMAND "make" "PREFIX=${CMAKE_BINARY_DIR}/" "install"
)
#
)
set_target_properties
(
openblas_proj PROPERTIES EXCLUDE_FROM_ALL 1
)
#
set_target_properties(openblas_proj PROPERTIES EXCLUDE_FROM_ALL 1)
# link openblas
# link openblas
include_directories
(
${
CMAKE_BINARY_DIR
}
/openblas
)
include_directories
(
third-party/openblas/include
)
link_directories
(
${
CMAKE_BINARY_DIR
}
/lib
)
link_directories
(
third-party/openblas
/lib
)
# link protobuf
# link protobuf
include_directories
(
third-party/protobuf/include
)
include_directories
(
third-party/protobuf/include
)
...
@@ -38,12 +38,12 @@ link_directories(third-party/protobuf/lib)
...
@@ -38,12 +38,12 @@ link_directories(third-party/protobuf/lib)
# gen so
# gen so
ADD_LIBRARY
(
paddle-mobile SHARED
${
PADDLE_MOBILE_CC
}
${
PADDLE_MOBILE_H
}
)
ADD_LIBRARY
(
paddle-mobile SHARED
${
PADDLE_MOBILE_CC
}
${
PADDLE_MOBILE_H
}
)
target_link_libraries
(
paddle-mobile protobuf-lite openblas
)
target_link_libraries
(
paddle-mobile protobuf-lite openblas
)
add_dependencies
(
paddle-mobile openblas_proj
)
#
add_dependencies(paddle-mobile openblas_proj)
# gen static
# gen static
ADD_LIBRARY
(
paddle-mobile-static STATIC
${
PADDLE_MOBILE_CC
}
${
PADDLE_MOBILE_H
}
)
ADD_LIBRARY
(
paddle-mobile-static STATIC
${
PADDLE_MOBILE_CC
}
${
PADDLE_MOBILE_H
}
)
target_link_libraries
(
paddle-mobile-static protobuf-lite openblas
)
target_link_libraries
(
paddle-mobile-static protobuf-lite openblas
)
add_dependencies
(
paddle-mobile openblas_proj
)
#
add_dependencies(paddle-mobile openblas_proj)
# gen test
# gen test
ADD_EXECUTABLE
(
paddle-mobile-test test/main.cpp test/test_helper.h
ADD_EXECUTABLE
(
paddle-mobile-test test/main.cpp test/test_helper.h
...
...
build.sh
浏览文件 @
7c7651f3
...
@@ -60,7 +60,7 @@ build_for_android() {
...
@@ -60,7 +60,7 @@ build_for_android() {
MODE
=
"Release"
MODE
=
"Release"
ANDROID_PLATFORM_VERSION
=
"android-15"
ANDROID_PLATFORM_VERSION
=
"android-15"
TOOLCHAIN_FILE
=
"./android-cmake/android.toolchain.cmake"
TOOLCHAIN_FILE
=
"./
tools/
android-cmake/android.toolchain.cmake"
ANDROID_ARM_MODE
=
"arm"
ANDROID_ARM_MODE
=
"arm"
cmake
.
\
cmake
.
\
...
@@ -82,7 +82,7 @@ build_for_ios() {
...
@@ -82,7 +82,7 @@ build_for_ios() {
PLATFORM
=
"ios"
PLATFORM
=
"ios"
MODE
=
"Release"
MODE
=
"Release"
BUILD_DIR
=
build/release/
"
${
PLATFORM
}
"
BUILD_DIR
=
build/release/
"
${
PLATFORM
}
"
TOOLCHAIN_FILE
=
"./ios-cmake/ios.toolchain.cmake"
TOOLCHAIN_FILE
=
"./
tools/
ios-cmake/ios.toolchain.cmake"
C_FLAGS
=
"-fobjc-abi-version=2 -fobjc-arc -isysroot
${
CMAKE_OSX_SYSROOT
}
"
C_FLAGS
=
"-fobjc-abi-version=2 -fobjc-arc -isysroot
${
CMAKE_OSX_SYSROOT
}
"
CXX_FLAGS
=
"-fobjc-abi-version=2 -fobjc-arc -std=gnu++11 -stdlib=libc++ -isysroot
${
CMAKE_OSX_SYSROOT
}
"
CXX_FLAGS
=
"-fobjc-abi-version=2 -fobjc-arc -std=gnu++11 -stdlib=libc++ -isysroot
${
CMAKE_OSX_SYSROOT
}
"
mkdir
-p
"
${
BUILD_DIR
}
"
mkdir
-p
"
${
BUILD_DIR
}
"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录