提交 bcc4ae25 编写于 作者: L liuruilong

modify ios build.sh

上级 86da216d
...@@ -3,7 +3,7 @@ project(paddle-mobile) ...@@ -3,7 +3,7 @@ project(paddle-mobile)
option(DEBUGING "enable debug mode" OFF) option(DEBUGING "enable debug mode" OFF)
option(USE_OPENMP "openmp support" OFF) option(USE_OPENMP "openmp support" OFF)
option(USE_EXCEPTION "use std exception" OFF) option(USE_EXCEPTION "use std exception" ON)
if (DEBUGING) if (DEBUGING)
set(CMAKE_BUILD_TYPE Debug) set(CMAKE_BUILD_TYPE Debug)
...@@ -127,8 +127,13 @@ else () ...@@ -127,8 +127,13 @@ else ()
add_definitions(-DTRANSPOSE_OP) add_definitions(-DTRANSPOSE_OP)
endif() endif()
if (IS_IOS)
add_library(paddle-mobile SHARED ${PADDLE_MOBILE_CC} ${PADDLE_MOBILE_H}) add_library(paddle-mobile STATIC ${PADDLE_MOBILE_CC} ${PADDLE_MOBILE_H})
elseif(ANDROID)
add_library(paddle-mobile SHARED ${PADDLE_MOBILE_CC} ${PADDLE_MOBILE_H})
else()
add_library(paddle-mobile SHARED ${PADDLE_MOBILE_CC} ${PADDLE_MOBILE_H})
endif ()
if(DEBUGING) if(DEBUGING)
add_subdirectory(test) add_subdirectory(test)
......
...@@ -69,7 +69,7 @@ class FushionFcOp : public framework::OperatorWithKernel<DeviceType> { ...@@ -69,7 +69,7 @@ class FushionFcOp : public framework::OperatorWithKernel<DeviceType> {
FushionFcParam param_; FushionFcParam param_;
}; };
// static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher()); static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher());
} // namespace operators } // namespace operators
} // namespace paddle_mobile } // namespace paddle_mobile
......
...@@ -98,7 +98,7 @@ build_for_ios() { ...@@ -98,7 +98,7 @@ build_for_ios() {
BUILD_DIR=../build/release/"${PLATFORM}" BUILD_DIR=../build/release/"${PLATFORM}"
TOOLCHAIN_FILE="./tools/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++14 -stdlib=libc++ -isysroot ${CMAKE_OSX_SYSROOT}"
mkdir -p "${BUILD_DIR}" mkdir -p "${BUILD_DIR}"
if [ $# -eq 1 ]; then if [ $# -eq 1 ]; then
NET=$1 NET=$1
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册