forked from BlueBrain/neuromapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
77 lines (57 loc) · 2.36 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
cmake_minimum_required (VERSION 2.8.10)
project (neuromapp)
# The version number.
set(LAST_RELEASE 1.0.0)
set(VERSION_MAJOR "1")
set(VERSION_MINOR "0")
set(VERSION_PATCH "0")
set(VERSION_ABI "1")
option (NEUROMAPP_CURSOR "Allow the use of cursors during input" OFF)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake)
include(Compiler)
string(REPLACE "-std=c++11" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_DIALECT_OPT_C99EXT}")
include(BlueGenePortability)
#find_package(Boost COMPONENTS thread date_time program_options filesystem system REQUIRED)
find_package(Boost 1.44 REQUIRED chrono program_options unit_test_framework system filesystem atomic random)
find_package(SLURM)
find_package(MPI)
## MPI link flags need to be overwritten on BG/Q
include(BlueGenePortability)
# include all directories
include_directories(${Boost_INCLUDE_DIRS} ${MPI_C_INCLUDE_PATH} )
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g ")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g ")
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
if(NEUROMAPP_CURSOR)
MESSAGE(STATUS "Using Cursors")
add_definitions(-DNEUROMAPP_CURSOR)
set(CURSES_NEED_NCURSES TRUE)
find_package(Curses REQUIRED)
find_package(Readline REQUIRED)
endif(NEUROMAPP_CURSOR)
enable_testing()
include_directories(neuromapp)
add_subdirectory (neuromapp)
#test
include(Testing)
add_subdirectory (test)
#prepare the input
execute_process(COMMAND unzip -o ${PROJECT_SOURCE_DIR}/neuromapp/coreneuron_1.0/common/data/bench.101392.zip
-d ${PROJECT_BINARY_DIR}/test/bench.101392)
#prepare the ref solution for the test
execute_process(COMMAND tar -xzvf ${PROJECT_SOURCE_DIR}/neuromapp/coreneuron_1.0/common/data/rhs_d_ref.tar.gz
-C ${PROJECT_BINARY_DIR}/test/)
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif()