-
Notifications
You must be signed in to change notification settings - Fork 26
/
CMakeLists.txt
347 lines (317 loc) · 19.2 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
cmake_minimum_required (VERSION 3.1)
project(piccante)
enable_language(CXX)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
## use C++11 if you can, otherwise boost 1.47+ is required for RNG)
set (CXX11_DISABLED OFF CACHE BOOL "C++11 DISABLED")
if (CXX11_DISABLED)
add_definitions(-DNO_CXX11)
else()
set(CMAKE_CXX_STANDARD 11)
endif()
# make sure that the default is a RELEASE
set(default_build_type "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
if (NOT BUILD_EXAMPLES)
set(BUILD_EXAMPLES OFF)
endif()
if(MSVC)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_USE_MATH_DEFINES)
endif()
include(ExternalProject)
## use Boost if you can (mandatory if C++11 is not available); if found, a USE_BOOST flag is declared - remove definition manually if you enable C++11!
find_package(Boost 1.47.0 COMPONENTS system filesystem)
if(Boost_FOUND)
add_definitions(-DUSE_BOOST)
include_directories(${Boost_INCLUDE_DIR})
endif()
if(NOT Boost_FOUND AND CXX11_DISABLED)
message(FATAL_ERROR "Without C++11 available, the system must provide Boost Libraries 1.47+")
endif()
find_package(MKL)
if(NOT MKL_FOUND)
find_package(FFTW)
if(FFTW_FOUND)
include_directories(${FFTW_INCLUDES})
endif()
else()
include_directories(${MKL_INCLUDE_DIRS})
endif()
if(FFTW_MPI_FOUND OR MKL_FOUND)
add_definitions(-D_USE_FFTW_FILTER)
endif()
#DO NOT ENABLE, since it is broken
#find_package(HDF5)
#if(HDF5_FOUND)
# add_definitions(-DUSE_HDF5)
# include_directories(${HDF5_INCLUDE_DIRS})
#endif()
find_package(JsonCpp)
if(NOT JsonCpp_FOUND)
if(CXX11_DISABLED)
message(FATAL_ERROR "Without C++11 available, the system must provide an already built jsoncpp library")
endif()
message(STATUS " --> JsonCpp will be built as an external project")
ExternalProject_Add(json-cpp
URL https://github.com/open-source-parsers/jsoncpp/archive/1.8.1.zip
CMAKE_ARGS
-DCMAKE_CXX_STANDARD=11
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DJSONCPP_WITH_TESTS:BOOL=OFF
-DCMAKE_LINKER=${CMAKE_LINKER}
-DBoost_NO_BOOST_CMAKE=ON
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
# Disable the install step.
INSTALL_COMMAND ""
# Wrap the download, configure and build steps in a script to log the output.
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON
)
ExternalProject_Get_Property(json-cpp source_dir)
ExternalProject_Get_Property(json-cpp binary_dir)
set(JsonCpp_INCLUDE_DIR "${source_dir}/include")
set(JsonCpp_LIBRARY_DIR "${binary_dir}/src/lib_json")
set(JsonCpp_LIBRARY "jsoncpp")
endif()
find_package(MPI REQUIRED)
file(DOWNLOAD "https://raw.githubusercontent.com/cenit/jburkardt/master/sobol/sobol.cpp"
${CMAKE_SOURCE_DIR}/src/sobol.cpp
TIMEOUT 3
STATUS download_status
)
file(DOWNLOAD "https://raw.githubusercontent.com/cenit/jburkardt/master/sobol/sobol.hpp"
${CMAKE_SOURCE_DIR}/src/sobol.hpp
TIMEOUT 3
STATUS download_status
)
execute_process(
COMMAND git --work-tree=. --git-dir=.git apply ${CMAKE_SOURCE_DIR}/cmake/sobol.patch --ignore-whitespace --whitespace=nowarn --verbose
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src
RESULT_VARIABLE error_code
)
add_definitions(-DUSE_SOBOL)
set(CMAKE_CXX_COMPILE_FLAGS "${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS}")
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS}")
include_directories(${JsonCpp_INCLUDE_DIR} ${jsoncpp_DIR} ${MPI_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/src/)
link_directories(${JsonCpp_LIBRARY_DIR})
set (COMMON_PICCANTE_FILES
${CMAKE_SOURCE_DIR}/src/current.cpp
${CMAKE_SOURCE_DIR}/src/em_field.cpp
${CMAKE_SOURCE_DIR}/src/grid.cpp
${CMAKE_SOURCE_DIR}/src/jsonparser.cpp
${CMAKE_SOURCE_DIR}/src/output_manager.cpp
${CMAKE_SOURCE_DIR}/src/particle_species.cpp
${CMAKE_SOURCE_DIR}/src/sobol.cpp
${CMAKE_SOURCE_DIR}/src/structures.cpp
${CMAKE_SOURCE_DIR}/src/utilities.cpp
)
add_executable (piccante ${CMAKE_SOURCE_DIR}/src/main-piccante.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_dev ${CMAKE_SOURCE_DIR}/src/main-devel.cpp ${COMMON_PICCANTE_FILES})
if (BUILD_EXAMPLES)
add_executable (piccante_clusters ${CMAKE_SOURCE_DIR}/examples/MAINS/clusters.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_landau_damping ${CMAKE_SOURCE_DIR}/examples/MAINS/landau_damping.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_1d_TNSA ${CMAKE_SOURCE_DIR}/examples/MAINS/1d_TNSA.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_1d_solitons ${CMAKE_SOURCE_DIR}/examples/MAINS/1d_solitons.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_1d_wakefield ${CMAKE_SOURCE_DIR}/examples/MAINS/1d_wakefield.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_2d_grating ${CMAKE_SOURCE_DIR}/examples/MAINS/2d_grating.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_2d_twostream ${CMAKE_SOURCE_DIR}/examples/MAINS/2d_twostream.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_2d_twostream_no_output ${CMAKE_SOURCE_DIR}/examples/MAINS/2d_twostream_no_output.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_2d_twostream_scaling ${CMAKE_SOURCE_DIR}/examples/MAINS/2d_twostream_scaling.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_2d_twostream_scaling_no_noutput ${CMAKE_SOURCE_DIR}/examples/MAINS/2d_twostream_scaling_no_noutput.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_2d_wakefield ${CMAKE_SOURCE_DIR}/examples/MAINS/2d_wakefield.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_2d_wakefield_no_output ${CMAKE_SOURCE_DIR}/examples/MAINS/2d_wakefield_no_output.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_3d_twostream ${CMAKE_SOURCE_DIR}/examples/MAINS/3d_twostream.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_3d_twostream_no_output ${CMAKE_SOURCE_DIR}/examples/MAINS/3d_twostream_no_output.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_3d_twostream_outputParamScan ${CMAKE_SOURCE_DIR}/examples/MAINS/3d_twostream_outputParamScan.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_3d_twostream_scaling ${CMAKE_SOURCE_DIR}/examples/MAINS/3d_twostream_scaling.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_3d_twostream_scaling_no_output ${CMAKE_SOURCE_DIR}/examples/MAINS/3d_twostream_scaling_no_output.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_3d_wakefield ${CMAKE_SOURCE_DIR}/examples/MAINS/3d_wakefield.cpp ${COMMON_PICCANTE_FILES})
add_executable (piccante_3d_wakefield_no_output ${CMAKE_SOURCE_DIR}/examples/MAINS/3d_wakefield_no_output.cpp ${COMMON_PICCANTE_FILES})
endif()
if(NOT JsonCpp_FOUND)
add_dependencies(piccante json-cpp)
add_dependencies(piccante_dev json-cpp)
if (BUILD_EXAMPLES)
add_dependencies(piccante_clusters json-cpp)
add_dependencies(piccante_landau_damping json-cpp)
add_dependencies(piccante_1d_TNSA json-cpp)
add_dependencies(piccante_1d_solitons json-cpp)
add_dependencies(piccante_1d_wakefield json-cpp)
add_dependencies(piccante_2d_grating json-cpp)
add_dependencies(piccante_2d_twostream json-cpp)
add_dependencies(piccante_2d_twostream_no_output json-cpp)
add_dependencies(piccante_2d_twostream_scaling json-cpp)
add_dependencies(piccante_2d_twostream_scaling_no_noutput json-cpp)
add_dependencies(piccante_2d_wakefield json-cpp)
add_dependencies(piccante_2d_wakefield_no_output json-cpp)
add_dependencies(piccante_3d_twostream json-cpp)
add_dependencies(piccante_3d_twostream_no_output json-cpp)
add_dependencies(piccante_3d_twostream_outputParamScan json-cpp)
add_dependencies(piccante_3d_twostream_scaling json-cpp)
add_dependencies(piccante_3d_twostream_scaling_no_output json-cpp)
add_dependencies(piccante_3d_wakefield json-cpp)
add_dependencies(piccante_3d_wakefield_no_output json-cpp)
endif()
endif()
target_link_libraries(piccante ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_dev ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
if (BUILD_EXAMPLES)
target_link_libraries(piccante_clusters ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_landau_damping ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_1d_TNSA ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_1d_solitons ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_1d_wakefield ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_2d_grating ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_2d_twostream ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_2d_twostream_no_output ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_2d_twostream_scaling ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_2d_twostream_scaling_no_noutput ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_2d_wakefield ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_2d_wakefield_no_output ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_3d_twostream ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_3d_twostream_no_output ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_3d_twostream_outputParamScan ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_3d_twostream_scaling ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_3d_twostream_scaling_no_output ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_3d_wakefield ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
target_link_libraries(piccante_3d_wakefield_no_output ${MPI_LIBRARIES} ${JsonCpp_LIBRARY})
endif()
if(Boost_FOUND)
target_link_libraries(piccante ${Boost_LIBRARIES})
target_link_libraries(piccante_dev ${Boost_LIBRARIES})
if (BUILD_EXAMPLES)
target_link_libraries(piccante_clusters ${Boost_LIBRARIES})
target_link_libraries(piccante_landau_damping ${Boost_LIBRARIES})
target_link_libraries(piccante_1d_TNSA ${Boost_LIBRARIES})
target_link_libraries(piccante_1d_solitons ${Boost_LIBRARIES})
target_link_libraries(piccante_1d_wakefield ${Boost_LIBRARIES})
target_link_libraries(piccante_2d_grating ${Boost_LIBRARIES})
target_link_libraries(piccante_2d_twostream ${Boost_LIBRARIES})
target_link_libraries(piccante_2d_twostream_no_output ${Boost_LIBRARIES})
target_link_libraries(piccante_2d_twostream_scaling ${Boost_LIBRARIES})
target_link_libraries(piccante_2d_twostream_scaling_no_noutput ${Boost_LIBRARIES})
target_link_libraries(piccante_2d_wakefield ${Boost_LIBRARIES})
target_link_libraries(piccante_2d_wakefield_no_output ${Boost_LIBRARIES})
target_link_libraries(piccante_3d_twostream ${Boost_LIBRARIES})
target_link_libraries(piccante_3d_twostream_no_output ${Boost_LIBRARIES})
target_link_libraries(piccante_3d_twostream_outputParamScan ${Boost_LIBRARIES})
target_link_libraries(piccante_3d_twostream_scaling ${Boost_LIBRARIES})
target_link_libraries(piccante_3d_twostream_scaling_no_output ${Boost_LIBRARIES})
target_link_libraries(piccante_3d_wakefield ${Boost_LIBRARIES})
target_link_libraries(piccante_3d_wakefield_no_output ${Boost_LIBRARIES})
endif()
endif()
if(HDF5_FOUND)
target_link_libraries(piccante ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_dev ${HDF5_CXX_LIBRARIES})
if (BUILD_EXAMPLES)
target_link_libraries(piccante_clusters ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_landau_damping ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_1d_TNSA ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_1d_solitons ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_1d_wakefield ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_2d_grating ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_2d_twostream ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_2d_twostream_no_output ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_2d_twostream_scaling ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_2d_twostream_scaling_no_noutput ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_2d_wakefield ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_2d_wakefield_no_output ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_3d_twostream ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_3d_twostream_no_output ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_3d_twostream_outputParamScan ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_3d_twostream_scaling ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_3d_twostream_scaling_no_output ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_3d_wakefield ${HDF5_CXX_LIBRARIES})
target_link_libraries(piccante_3d_wakefield_no_output ${HDF5_CXX_LIBRARIES})
endif()
endif()
if (FFTW_FOUND AND FFTW_MPI_FOUND AND NOT MKL_FOUND)
target_link_libraries(piccante ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_dev ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
if (BUILD_EXAMPLES)
target_link_libraries(piccante_clusters ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_landau_damping ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_1d_TNSA ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_1d_solitons ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_1d_wakefield ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_2d_grating ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_2d_twostream ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_2d_twostream_no_output ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_2d_twostream_scaling ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_2d_twostream_scaling_no_noutput ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_2d_wakefield ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_2d_wakefield_no_output ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_3d_twostream ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_3d_twostream_no_output ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_3d_twostream_outputParamScan ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_3d_twostream_scaling ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_3d_twostream_scaling_no_output ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_3d_wakefield ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
target_link_libraries(piccante_3d_wakefield_no_output ${FFTW_LIBRARIES} ${FFTW_MPI_LIBRARIES})
endif()
endif()
if (MKL_FOUND AND NOT FFTW_FOUND AND NOT FFTW_MPI_FOUND)
target_link_libraries(piccante ${MKL_LIBRARIES})
target_link_libraries(piccante_dev ${MKL_LIBRARIES})
if (BUILD_EXAMPLES)
target_link_libraries(piccante_clusters ${MKL_LIBRARIES})
target_link_libraries(piccante_landau_damping ${MKL_LIBRARIES})
target_link_libraries(piccante_1d_TNSA ${MKL_LIBRARIES})
target_link_libraries(piccante_1d_solitons ${MKL_LIBRARIES})
target_link_libraries(piccante_1d_wakefield ${MKL_LIBRARIES})
target_link_libraries(piccante_2d_grating ${MKL_LIBRARIES})
target_link_libraries(piccante_2d_twostream ${MKL_LIBRARIES})
target_link_libraries(piccante_2d_twostream_no_output ${MKL_LIBRARIES})
target_link_libraries(piccante_2d_twostream_scaling ${MKL_LIBRARIES})
target_link_libraries(piccante_2d_twostream_scaling_no_noutput ${MKL_LIBRARIES})
target_link_libraries(piccante_2d_wakefield ${MKL_LIBRARIES})
target_link_libraries(piccante_2d_wakefield_no_output ${MKL_LIBRARIES})
target_link_libraries(piccante_3d_twostream ${MKL_LIBRARIES})
target_link_libraries(piccante_3d_twostream_no_output ${MKL_LIBRARIES})
target_link_libraries(piccante_3d_twostream_outputParamScan ${MKL_LIBRARIES})
target_link_libraries(piccante_3d_twostream_scaling ${MKL_LIBRARIES})
target_link_libraries(piccante_3d_twostream_scaling_no_output ${MKL_LIBRARIES})
target_link_libraries(piccante_3d_wakefield ${MKL_LIBRARIES})
target_link_libraries(piccante_3d_wakefield_no_output ${MKL_LIBRARIES})
endif()
endif()
install (TARGETS
piccante
piccante_dev
DESTINATION ${CMAKE_SOURCE_DIR}/bin/
)
if (BUILD_EXAMPLES)
install (TARGETS
piccante_clusters
piccante_landau_damping
piccante_1d_TNSA
piccante_1d_solitons
piccante_1d_wakefield
piccante_2d_grating
piccante_2d_twostream
piccante_2d_twostream_no_output
piccante_2d_twostream_scaling
piccante_2d_twostream_scaling_no_noutput
piccante_2d_wakefield
piccante_2d_wakefield_no_output
piccante_3d_twostream
piccante_3d_twostream_no_output
piccante_3d_twostream_outputParamScan
piccante_3d_twostream_scaling
piccante_3d_twostream_scaling_no_output
piccante_3d_wakefield
piccante_3d_wakefield_no_output
DESTINATION ${CMAKE_SOURCE_DIR}/bin/examples/
)
endif()