forked from CmPA/iPic3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
106 lines (89 loc) · 1.56 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
cmake_minimum_required(VERSION 2.8.8)
#
# Project declaration
#
project(iPic3D)
#
# Set exec path
#
set(EXECUTABLE_OUTPUT_PATH work/${CMAKE_BUILD_TYPE})
set(LIBRARY_OUTPUT_PATH lib)
#
# Find third class libraries
#
find_package(HDF5 COMPONENTS C HL REQUIRED)
find_package(MPI REQUIRED)
#
# include and lib directories
#
include_directories(
include
${HDF5_INCLUDE_DIRS}
${MPI_INCLUDE_PATH}
)
link_directories(
${HDF5_LIBRARY_DIRS}
${MPI_LIBRARY_DIRS}
)
#
# Header file list
#
file(
GLOB
inc_files
ConfigFile/src/*.h
PSKOutput3D/*.h
bc/*.h
communication/*.h
fields/*.h
grids/*.h
iPIC3D.h/*.h
inputoutput/*.h
mathlib/*.h
mpidata/*.h
particles/*.h
performances/*.h
processtopology/*.h
solvers/*.h
utility/*.h
)
#
# Source file list
#
file(
GLOB
src_files
ConfigFile/src/*.cpp
PSKOutput3D/*.cpp
bc/*.cpp
communication/*.cpp
fields/*.cpp
grids/*.cpp
iPIC3D.cpp/*.cpp
inputoutput/*.cpp
mathlib/*.cpp
mpidata/*.cpp
particles/*.cpp
performances/*.cpp
processtopology/*.cpp
solvers/*.cpp
utility/*.cpp
iPIC3D.cpp
)
#
# Executable declaration
#
add_executable(
iPIC3D
${inc_files}
${src_files}
)
#
# Link external libraries
#
target_link_libraries(
iPIC3D
${HDF5_LIBRARIES}
${HDF5_HL_LIBRARIES}
${MPI_LIBRARIES}
)