-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
39 lines (28 loc) · 1.27 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cmake_minimum_required(VERSION 2.8)
project (rapidmp)
enable_testing()
include(CheckIncludeFiles)
include(CheckCXXSourceCompiles)
# build type
set(CMAKE_BUILD_TYPE Release)
# compile option (Debug)
set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -Wextra -Wno-array-bounds -Werror -std=c++0x")
set(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -Wno-array-bounds -Werror")
# compile option (Release)
set(CMAKE_CXX_FLAGS_RELEASE "-W -Wall -Wextra -Wno-array-bounds -Werror -std=c++0x -O3")
set(CMAKE_C_FLAGS_RELEASE "-W -Wall -Wextra -Wno-array-bounds -Werror -O3")
#if you don't want the full compiler output, remove the following line
set(CMAKE_VERBOSE_MAKEFILE ON)
set(Boost_USE_MULTITHREADED ON)
find_package(Boost 1.49.0 COMPONENTS python program_options unit_test_framework REQUIRED )
if (NOT Boost_FOUND)
message(SEND_ERROR "Required package Boost is not exist.")
endif (NOT Boost_FOUND)
find_package(PythonLibs REQUIRED )
if (NOT PYTHONLIBS_FOUND )
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/include ${Boost_INCLUDE_DIRS} )
else()
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/include ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} )
endif()
link_directories( ${Boost_LIBRARY_DIRS} )
subdirs( include test benchmark )