-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.in
97 lines (89 loc) · 2.13 KB
/
env.in
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
set(ENV_INCLUDED "Done")
# the library
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
set(LIBRARY_OUTPUT_PATH lib)
set(Abcd_INCLUDE_DIRS
${ABCD_PROJECT_DIR}/include
${ABCD_PROJECT_DIR}/lib/sparselib/include
${ABCD_PROJECT_DIR}/lib/sparselib/mv/include
${ABCD_PROJECT_DIR}/python/numpy
${ABCD_PROJECT_DIR}/python/numpy/boost
${ABCD_PROJECT_DIR}/python/numpy/boost/numpy
)
set(Abcd_LIBRARY_DIRS
${ABCD_PROJECT_BINARY_DIR}/${CMAKE_BUILD_TYPE}
${ABCD_PROJECT_DIR}/lib
${ABCD_PROJECT_DIR}/lib/sparselib/lib/
)
# Compilation flags
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64 -z muldefs ${CMAKE_OPENMP_FLAG} -march=native")
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -z muldefs -std=c++11 ${CMAKE_OPENMP_FLAG} -march=native")
SET( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64 -z muldefs ${CMAKE_OPENMP_FLAG} -march=native")
##Dependencies
# BOOST
set(BOOST_LIBRARIES
boost_mpi
boost_serialization
)
IF (PYTHON)
set(BOOST_LIBRARIES
boost_python
${BOOST_LIBRARIES}
)
ENDIF()
if(${USE_MUMPS} EQUAL 1)
message(STATUS "Activation of MUMPS")
add_definitions(-DUSE_MUMPS)
endif()
if(${USE_SPLDLT} EQUAL 1)
message(STATUS "Activation of SPLDLT")
add_definitions(-DUSE_SPLDLT)
endif()
# Others
if(PATOH MATCHES ON)
add_definitions(-DPATOH)
set(LIBS ${LIBS} patoh)
endif()
if(MUMPS_ES MATCHES OFF)
add_definitions(-DNO_MUMPS_ES)
endif()
if(WIP MATCHES ON)
add_definitions(-DWIP)
endif()
# includes
include_directories(
${Python_INCLUDE_DIRS}
${Abcd_INCLUDE_DIRS}
${BOOST_INCLUDE_DIRS}
${MPI_INC_DIR}
${BLAS_LAPACK_SCALAPACK_INC}
${INC_DIRS}
${PYTHON_INCLUDE_DIR}
${PYTHON_NUMPY_INCLUDE_DIR}
)
# libraries
link_directories(
${Abcd_LIBRARY_DIRS}
${BOOST_LIBRARY_DIRS}
${BLAS_LAPACK_SCALAPACK_DIRS}
${MPI_LIB_DIR}
${LIB_DIRS}
)
set(MUMPSLIBS)
IF(${USE_MUMPS} EQUAL 1)
set(MUMPSLIBS
dmumps
mumps_common
pord)
ENDIF()
set(LIBS
${BOOST_LIBRARIES}
${MUMPSLIBS}
sparse
spblas
mv
pthread
${BLAS_LAPACK_SCALAPACK_LIBS}
${MPI_LIBRARIES}
${LIBS}
)