From 2a731d494a2be783197e5111b0d7c1e245138b49 Mon Sep 17 00:00:00 2001 From: liuruilong Date: Mon, 23 Jul 2018 22:55:08 +0800 Subject: [PATCH] modify ios build cmake tool chain --- src/operators/op_param.h | 2 +- tools/build.sh | 5 +---- tools/ios-cmake/ios.toolchain.cmake | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/operators/op_param.h b/src/operators/op_param.h index 4b95ceb187..4948a51632 100644 --- a/src/operators/op_param.h +++ b/src/operators/op_param.h @@ -993,7 +993,7 @@ class FusionConvAddBNReluParam : public OpParam { input_variance_ = InputVarianceFrom(inputs, scope); epsilon_ = GetAttr("epsilon", attrs); momentum_ = GetAttr("momentum", attrs); - is_test_ = GetAttr("is_test", attrs); + // is_test_ = GetAttr("is_test", attrs); } Tensor *Bias() const { return bias_; } diff --git a/tools/build.sh b/tools/build.sh index 54680f50ef..e0eb05fc8c 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -93,10 +93,7 @@ build_for_ios() { # rm -rf "../build" PLATFORM="ios" MODE="Release" -# IOS_ARCH="armv7" -# IOS_ARCH="armv7s" - IOS_ARCH="arm64" # Users could choose "armv7" or "armv7s" platforms. - BUILD_DIR=../build/release/"${PLATFORM}"/"${IOS_ARCH}" + BUILD_DIR=../build/release/"${PLATFORM}"/ TOOLCHAIN_FILE="./tools/ios-cmake/ios.toolchain.cmake" mkdir -p "${BUILD_DIR}" if [ $# -eq 1 ]; then diff --git a/tools/ios-cmake/ios.toolchain.cmake b/tools/ios-cmake/ios.toolchain.cmake index a81f066c11..4db079d01d 100644 --- a/tools/ios-cmake/ios.toolchain.cmake +++ b/tools/ios-cmake/ios.toolchain.cmake @@ -34,6 +34,7 @@ set (CMAKE_SYSTEM_VERSION 1) set (UNIX True) set (APPLE True) set (IOS True) +set (IOS_ARCH armv7 armv7s arm64) # Required as of cmake 2.8.10 set (CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE) -- GitLab