CMakeLists.txt 652 字节
Newer Older
朔-望's avatar
朔-望 已提交
1 2
cmake_minimum_required(VERSION 3.0)
project(paddle-mobile)
W
wangliu 已提交
3 4
add_definitions(-DPADDLE_MOBILE_DEBUG)
add_definitions(-DENABLE_EXCEPTION)
朔-望's avatar
朔-望 已提交
5

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

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

include_directories(src/)

Y
Yi Wang 已提交
19
add_library(paddle-mobile SHARED ${PADDLE_MOBILE_CC} ${PADDLE_MOBILE_H})
朔-望's avatar
朔-望 已提交
20

L
liuruilong 已提交
21
add_subdirectory(test)