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

Merge branch 'develop' into develop

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