提交 afd75d4e 编写于 作者: xiebaiyuan's avatar xiebaiyuan

suite res barry

上级 556ddfb6
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.0)
option(USE_OPENMP "openmp support" OFF)
project(paddle-mobile)
......
......@@ -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"
......@@ -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
......
# 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.
先完成此消息的编辑!
想要评论请 注册