Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
46ee8cee
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
46ee8cee
编写于
9月 15, 2017
作者:
L
Liu Yiqun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move the sreach and link of veclib to iOS's toolchain file .
上级
76338fb6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
27 deletion
+38
-27
cmake/cblas.cmake
cmake/cblas.cmake
+5
-25
cmake/cross_compiling/ios.cmake
cmake/cross_compiling/ios.cmake
+33
-2
未找到文件。
cmake/cblas.cmake
浏览文件 @
46ee8cee
...
@@ -172,29 +172,9 @@ if (REFERENCE_CBLAS_INCLUDE_DIR AND REFERENCE_CBLAS_LIBRARY)
...
@@ -172,29 +172,9 @@ if (REFERENCE_CBLAS_INCLUDE_DIR AND REFERENCE_CBLAS_LIBRARY)
message
(
STATUS
"Found reference-cblas (include:
${
CBLAS_INC_DIR
}
, library:
${
CBLAS_LIBRARIES
}
)"
)
message
(
STATUS
"Found reference-cblas (include:
${
CBLAS_INC_DIR
}
, library:
${
CBLAS_LIBRARIES
}
)"
)
endif
()
endif
()
if
(
IOS
)
if
(
IOS_USE_VECLIB_FOR_BLAS AND VECLIB_FOUND
)
# Find vecLib for iOS
set
(
CBLAS_FOUND ON
)
set
(
VECLIB_SEARCH_DIRS
set
(
CBLAS_PROVIDER vecLib
)
${
IOS_SDK_ROOT
}
/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks
set
(
CBLAS_INC_DIR
${
VECLIB_INC_DIR
}
)
${
IOS_SDK_ROOT
}
/System/Library/Frameworks/Accelerate.framework/Frameworks
add_definitions
(
-DPADDLE_USE_VECLIB
)
)
find_path
(
VECLIB_INC_DIR vecLib.h PATHS
${
VECLIB_SEARCH_DIRS
}
/vecLib.framework/Headers
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
vecLib DEFAULT_MSG VECLIB_INC_DIR
)
if
(
VECLIB_FOUND
)
set
(
CBLAS_FOUND ON
)
set
(
CBLAS_PROVIDER vecLib
)
set
(
CBLAS_INC_DIR
${
VECLIB_INC_DIR
}
)
if
(
VECLIB_INC_DIR MATCHES
"^/System/Library/Frameworks/vecLib.framework.*"
)
set
(
CBLAS_LIBRARIES -lcblas
"-framework vecLib"
)
message
(
STATUS
"Found standalone vecLib.framework"
)
else
()
set
(
CBLAS_LIBRARIES -lcblas
"-framework Accelerate"
)
message
(
STATUS
"Found vecLib as part of Accelerate.framework"
)
endif
()
add_definitions
(
-DPADDLE_USE_VECLIB
)
endif
()
endif
()
endif
()
cmake/cross_compiling/ios.cmake
浏览文件 @
46ee8cee
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
# IOS_DEPLOYMENT_TARGET
# IOS_DEPLOYMENT_TARGET
# The minimum iOS deployment version, such as "7.0"
# The minimum iOS deployment version, such as "7.0"
# IOS_ENABLE_BITCODE = ON (default) or OFF
# IOS_ENABLE_BITCODE = ON (default) or OFF
# IOS_USE_VECLIB_FOR_BLAS = OFF (default) or ON
# IOS_DEVELOPER_ROOT = automatic(default) or /path/to/platform/Developer folder
# IOS_DEVELOPER_ROOT = automatic(default) or /path/to/platform/Developer folder
# By default this location is automatcially chosen based on the IOS_PLATFORM value above.
# By default this location is automatcially chosen based on the IOS_PLATFORM value above.
# If set manually, it will override the default location and force the user of a particular Developer Platform
# If set manually, it will override the default location and force the user of a particular Developer Platform
...
@@ -97,6 +98,11 @@ if(NOT DEFINED IOS_ENABLE_BITCODE)
...
@@ -97,6 +98,11 @@ if(NOT DEFINED IOS_ENABLE_BITCODE)
endif
()
endif
()
set
(
IOS_ENABLE_BITCODE
${
IOS_ENABLE_BITCODE
}
CACHE BOOL
"Whether to enable bitcode"
)
set
(
IOS_ENABLE_BITCODE
${
IOS_ENABLE_BITCODE
}
CACHE BOOL
"Whether to enable bitcode"
)
if
(
NOT DEFINED IOS_USE_VECLIB_FOR_BLAS
)
set
(
IOS_USE_VECLIB_FOR_BLAS OFF
)
endif
()
set
(
IOS_USE_VECLIB_FOR_BLAS
${
IOS_UES_VECLIB_FOR_BLAS
}
CACHE BOOL
"Whether to use veclib"
)
# Check the platform selection and setup for developer root
# Check the platform selection and setup for developer root
if
(
${
IOS_PLATFORM
}
STREQUAL
"OS"
)
if
(
${
IOS_PLATFORM
}
STREQUAL
"OS"
)
set
(
IOS_PLATFORM_LOCATION
"iPhoneOS.platform"
)
set
(
IOS_PLATFORM_LOCATION
"iPhoneOS.platform"
)
...
@@ -245,8 +251,33 @@ set(IOS_COMPILER_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${XCODE_IOS_BITCODE_
...
@@ -245,8 +251,33 @@ set(IOS_COMPILER_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${XCODE_IOS_BITCODE_
set
(
CMAKE_C_FLAGS
"
${
IOS_COMPILER_FLAGS
}
${
CMAKE_C_FLAGS
}
"
CACHE STRING
"C flags"
)
set
(
CMAKE_C_FLAGS
"
${
IOS_COMPILER_FLAGS
}
${
CMAKE_C_FLAGS
}
"
CACHE STRING
"C flags"
)
set
(
CMAKE_CXX_FLAGS
"
${
IOS_COMPILER_FLAGS
}
-fvisibility-inlines-hidden
${
CMAKE_CXX_FLAGS
}
"
CACHE STRING
"CXX flags"
)
set
(
CMAKE_CXX_FLAGS
"
${
IOS_COMPILER_FLAGS
}
-fvisibility-inlines-hidden
${
CMAKE_CXX_FLAGS
}
"
CACHE STRING
"CXX flags"
)
set
(
CMAKE_C_LINK_FLAGS
"
${
XCODE_IOS_PLATFORM_VERSION_FLAGS
}
-Wl,-search_paths_first
${
CMAKE_C_LINK_FLAGS
}
"
)
set
(
IOS_LINK_FLAGS
"
${
XCODE_IOS_PLATFORM_VERSION_FLAGS
}
-Wl,-search_paths_first"
)
set
(
CMAKE_CXX_LINK_FLAGS
"
${
XCODE_IOS_PLATFORM_VERSION_FLAGS
}
-Wl,-search_paths_first
${
CMAKE_CXX_LINK_FLAGS
}
"
)
if
(
IOS_USE_VECLIB_FOR_BLAS
)
# Find vecLib for iOS
set
(
VECLIB_SEARCH_DIRS
${
IOS_SDK_ROOT
}
/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks
${
IOS_SDK_ROOT
}
/System/Library/Frameworks/Accelerate.framework/Frameworks
)
find_path
(
VECLIB_INC_DIR vecLib.h PATHS
${
VECLIB_SEARCH_DIRS
}
/vecLib.framework/Headers
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
vecLib DEFAULT_MSG VECLIB_INC_DIR
)
if
(
VECLIB_FOUND
)
if
(
VECLIB_INC_DIR MATCHES
"^/System/Library/Frameworks/vecLib.framework.*"
)
set
(
IOS_LINK_FLAGS
${
IOS_LINK_FLAGS
}
-lcblas
"-framework vecLib"
)
message
(
STATUS
"Found standalone vecLib.framework"
)
else
()
set
(
IOS_LINK_FLAGS
${
IOS_LINK_FLAGS
}
-lcblas
"-framework Accelerate"
)
message
(
STATUS
"Found vecLib as part of Accelerate.framework"
)
endif
()
endif
()
endif
()
set
(
CMAKE_C_LINK_FLAGS
"
${
IOS_LINK_FLAGS
}
${
CMAKE_C_LINK_FLAGS
}
"
)
set
(
CMAKE_CXX_LINK_FLAGS
"
${
IOS_LINK_FLAGS
}
${
CMAKE_CXX_LINK_FLAGS
}
"
)
set
(
CMAKE_PLATFORM_HAS_INSTALLNAME 1
)
set
(
CMAKE_PLATFORM_HAS_INSTALLNAME 1
)
if
(
NOT IOS_ENABLE_BITCODE
)
if
(
NOT IOS_ENABLE_BITCODE
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录