CMakeLists.txt 1.2 KB
Newer Older
朔-望's avatar
朔-望 已提交
1 2 3 4
cmake_minimum_required(VERSION 3.0)
project(paddle-mobile)
add_definitions(-DPADDLE_MOBILE_DEBUG="true")

L
liuruilong 已提交
5
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
朔-望's avatar
朔-望 已提交
6
set(CMAKE_BUILD_TYPE RelWithDebInfo)
朔-望's avatar
朔-望 已提交
7 8
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
朔-望's avatar
朔-望 已提交
9 10 11 12
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY build)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build)

L
liuruilong 已提交
13
file(GLOB_RECURSE PADDLE_MOBILE_CC src/*.cc src/*.cpp src/*.c)
朔-望's avatar
朔-望 已提交
14 15 16 17 18
file(GLOB_RECURSE PADDLE_MOBILE_H src/*.h)

# include headers
include_directories(src/)

Z
zhaojiaying01 已提交
19 20 21 22 23 24 25 26 27 28 29
#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)
朔-望's avatar
朔-望 已提交
30

Z
zhaojiaying01 已提交
31
#add_dependencies(paddle-mobile openblas_proj)
朔-望's avatar
朔-望 已提交
32 33

# gen static
L
liuruilong 已提交
34 35
ADD_LIBRARY(paddle-mobile SHARED ${PADDLE_MOBILE_CC} ${PADDLE_MOBILE_H})

Z
zhaojiaying01 已提交
36
#add_dependencies(paddle-mobile openblas_proj)
朔-望's avatar
朔-望 已提交
37

L
liuruilong 已提交
38
add_subdirectory(test)