提交 7c7651f3 编写于 作者: R Ruilong Liu 提交者: GitHub

Merge branch 'develop' into develop

......@@ -16,20 +16,20 @@ file(GLOB_RECURSE PADDLE_MOBILE_H src/*.h)
# include headers
include_directories(src/)
include(ExternalProject)
ExternalProject_Add(openblas_proj
GIT_REPOSITORY "https://github.com/xianyi/OpenBLAS.git"
GIT_TAG "v0.2.20"
SOURCE_DIR "openblas/"
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ""
BUILD_COMMAND "make" "ONLY_CBLAS=1"
INSTALL_COMMAND "make" "PREFIX=${CMAKE_BINARY_DIR}/" "install"
)
set_target_properties(openblas_proj PROPERTIES EXCLUDE_FROM_ALL 1)
#include(ExternalProject)
#ExternalProject_Add(openblas_proj
# GIT_REPOSITORY "https://github.com/xianyi/OpenBLAS.git"
# GIT_TAG "v0.2.20"
# SOURCE_DIR "openblas/"
# BUILD_IN_SOURCE 1
# CONFIGURE_COMMAND ""
# BUILD_COMMAND "make" "ONLY_CBLAS=1"
# INSTALL_COMMAND "make" "PREFIX=${CMAKE_BINARY_DIR}/" "install"
# )
#set_target_properties(openblas_proj PROPERTIES EXCLUDE_FROM_ALL 1)
# link openblas
include_directories(${CMAKE_BINARY_DIR}/openblas)
link_directories(${CMAKE_BINARY_DIR}/lib)
include_directories(third-party/openblas/include)
link_directories(third-party/openblas/lib)
# link protobuf
include_directories(third-party/protobuf/include)
......@@ -38,12 +38,12 @@ link_directories(third-party/protobuf/lib)
# gen so
ADD_LIBRARY(paddle-mobile SHARED ${PADDLE_MOBILE_CC} ${PADDLE_MOBILE_H})
target_link_libraries(paddle-mobile protobuf-lite openblas)
add_dependencies(paddle-mobile openblas_proj)
#add_dependencies(paddle-mobile openblas_proj)
# gen static
ADD_LIBRARY(paddle-mobile-static STATIC ${PADDLE_MOBILE_CC} ${PADDLE_MOBILE_H})
target_link_libraries(paddle-mobile-static protobuf-lite openblas)
add_dependencies(paddle-mobile openblas_proj)
#add_dependencies(paddle-mobile openblas_proj)
# gen test
ADD_EXECUTABLE(paddle-mobile-test test/main.cpp test/test_helper.h
......
......@@ -60,7 +60,7 @@ build_for_android() {
MODE="Release"
ANDROID_PLATFORM_VERSION="android-15"
TOOLCHAIN_FILE="./android-cmake/android.toolchain.cmake"
TOOLCHAIN_FILE="./tools/android-cmake/android.toolchain.cmake"
ANDROID_ARM_MODE="arm"
cmake . \
......@@ -82,7 +82,7 @@ build_for_ios() {
PLATFORM="ios"
MODE="Release"
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}"
CXX_FLAGS="-fobjc-abi-version=2 -fobjc-arc -std=gnu++11 -stdlib=libc++ -isysroot ${CMAKE_OSX_SYSROOT}"
mkdir -p "${BUILD_DIR}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册