-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
39 lines (27 loc) · 1.16 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
39
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(LinkedTree)
FIND_PACKAGE( Boost 1.40 COMPONENTS mpi REQUIRED )
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
find_package(MPI REQUIRED)
include_directories(${MPI_CXX_INCLUDE_PATH})
set(TFTT_NAME "LinkedTree")
set(TFTT_VERSION "0.0.0")
set(TFTT_BRIEF "${TFTT_NAME} implements a parallel Threaded Fully-Threaded-Tree structure.")
set(COMMON_FLAGS "-std=c++11 ${MPI_COMPILE_FLAGS}")
set(DEBUG_FLAGS "${COMMON_FLAGS} -O0 -Wall -DTFTT_DEBUG -ggdb")
set(RELEASE_FLAGS "${COMMON_FLAGS} -O3 -DNDEBUG")
set(PROFILE_FLAGS "${COMMON_FLAGS} -O0 -pg")
set(CMAKE_CXX_FLAGS_DEBUG ${DEBUG_FLAGS})
set(CMAKE_C_FLAGS_DEBUG ${DEBUG_FLAGS})
set(CMAKE_EXE_LINKER_FLAGS_DEBUG ${DEBUG_FLAGS})
set(CMAKE_CXX_FLAGS_RELEASE ${RELEASE_FLAGS})
set(CMAKE_C_FLAGS_RELEASE ${RELEASE_FLAGS})
set(CMAKE_EXE_LINKER_FLAGS_RELEASE ${RELEASE_FLAGS})
set(CMAKE_CXX_FLAGS_PROFILE ${PROFILE_FLAGS})
set(CMAKE_C_FLAGS_PROFILE ${PROFILE_FLAGS})
set(CMAKE_EXE_LINKER_FLAGS_PROFILE ${PROFILE_FLAGS})
set(CMAKE_CONFIGURATION_TYPES Debug Release Profile)
message("* Build type is : ${CMAKE_BUILD_TYPE}")
add_subdirectory(lib)
add_subdirectory(test)
add_subdirectory(docs)