CMakeLists.txt 8.81 KB
Newer Older
1
2
3
4
5
#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0.  See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#
  
6
7
8
9
10
11
add_library(taustubs
  toolkit/profiling/taustubs/tautimer.cpp
  toolkit/profiling/taustubs/tautimer.hpp
  toolkit/profiling/taustubs/taustubs.h
)

12
13
14
15
target_include_directories(taustubs PRIVATE
      $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/source>
)

16
add_library(adios2
17
  common/ADIOSTypes.cpp
18
  
williamfgc's avatar
williamfgc committed
19
  core/Attribute.cpp 
20
  core/AttributeBase.cpp
21
  core/ADIOS.cpp
22
  core/Engine.cpp
23
  core/IO.cpp core/IO.tcc
williamfgc's avatar
williamfgc committed
24
25
  core/Operator.cpp
  core/Stream.cpp core/Stream.tcc
26
  core/Variable.cpp core/Variable.tcc
27
28
  core/VariableBase.cpp
  core/VariableCompound.cpp core/VariableCompound.tcc
29
30

#operator callback
31
  operator/callback/Signature1.cpp
32
33
  operator/callback/Signature2.cpp

34
#helper
35
  helper/adiosComm.h  helper/adiosComm.cpp
36
  helper/adiosCommDummy.h  helper/adiosCommDummy.cpp
37
  helper/adiosDynamicBinder.h  helper/adiosDynamicBinder.cpp
38
  helper/adiosMath.cpp
39
  helper/adiosMemory.cpp
40
  helper/adiosNetwork.cpp
William F Godoy's avatar
William F Godoy committed
41
  helper/adiosString.cpp helper/adiosString.tcc
42
43
44
  helper/adiosSystem.cpp
  helper/adiosType.cpp
  helper/adiosXML.cpp
45
  helper/adiosYAML.cpp
williamfgc's avatar
williamfgc committed
46
47

#engine derived classes  
48
49
  engine/bp3/BP3Reader.cpp engine/bp3/BP3Reader.tcc
  engine/bp3/BP3Writer.cpp engine/bp3/BP3Writer.tcc
50

51
52
  engine/bp4/BP4Reader.cpp engine/bp4/BP4Reader.tcc
  engine/bp4/BP4Writer.cpp engine/bp4/BP4Writer.tcc
Wan, Lipeng's avatar
Wan, Lipeng committed
53

54
55
56
  engine/skeleton/SkeletonReader.cpp engine/skeleton/SkeletonReader.tcc
  engine/skeleton/SkeletonWriter.cpp engine/skeleton/SkeletonWriter.tcc

57
58
  engine/inline/InlineReader.cpp engine/inline/InlineReader.tcc
  engine/inline/InlineWriter.cpp engine/inline/InlineWriter.tcc
William F Godoy's avatar
William F Godoy committed
59
60
  
  engine/null/NullEngine.cpp
61

62
  engine/nullcore/NullCoreWriter.cpp engine/nullcore/NullCoreWriter.tcc
williamfgc's avatar
williamfgc committed
63
#toolkit
64
  toolkit/format/buffer/Buffer.cpp
William F Godoy's avatar
William F Godoy committed
65
  toolkit/format/buffer/heap/BufferSTL.cpp
66

William F Godoy's avatar
William F Godoy committed
67
  toolkit/format/bp/BPBase.cpp toolkit/format/bp/BPBase.tcc
William F Godoy's avatar
William F Godoy committed
68
  toolkit/format/bp/BPSerializer.cpp toolkit/format/bp/BPSerializer.tcc
69

William F Godoy's avatar
William F Godoy committed
70
71
72
73
74
75
76
  toolkit/format/bp/bp3/BP3Base.cpp
  toolkit/format/bp/bp3/BP3Serializer.cpp toolkit/format/bp/bp3/BP3Serializer.tcc
  toolkit/format/bp/bp3/BP3Deserializer.cpp toolkit/format/bp/bp3/BP3Deserializer.tcc

  toolkit/format/bp/bp4/BP4Base.cpp
  toolkit/format/bp/bp4/BP4Serializer.cpp toolkit/format/bp/bp4/BP4Serializer.tcc
  toolkit/format/bp/bp4/BP4Deserializer.cpp toolkit/format/bp/bp4/BP4Deserializer.tcc
William F Godoy's avatar
William F Godoy committed
77
  
William F Godoy's avatar
William F Godoy committed
78
79
80
81
82
83
84
85
86
87
  toolkit/format/bp/bpOperation/BPOperation.cpp 
  toolkit/format/bp/bpOperation/BPOperation.tcc
  toolkit/format/bp/bpOperation/compress/BPZFP.cpp 
  toolkit/format/bp/bpOperation/compress/BPZFP.tcc
  toolkit/format/bp/bpOperation/compress/BPSZ.cpp
  toolkit/format/bp/bpOperation/compress/BPMGARD.cpp
  toolkit/format/bp/bpOperation/compress/BPPNG.cpp
  toolkit/format/bp/bpOperation/compress/BPBZIP2.cpp 
  toolkit/format/bp/bpOperation/compress/BPBZIP2.tcc
  toolkit/format/bp/bpOperation/compress/BPBlosc.cpp
William F Godoy's avatar
William F Godoy committed
88
  
89
  toolkit/profiling/iochrono/Timer.cpp
William F Godoy's avatar
William F Godoy committed
90
  toolkit/profiling/iochrono/IOChrono.cpp
91

92
93
94
95
96
97
  toolkit/query/Query.cpp
  toolkit/query/Worker.cpp
  toolkit/query/XmlUtil.cpp
  toolkit/query/XmlWorker.cpp
  toolkit/query/BlockIndex.cpp

98
  toolkit/transport/Transport.cpp
99
100
  toolkit/transport/file/FileStdio.cpp
  toolkit/transport/file/FileFStream.cpp
101
  toolkit/transport/null/NullTransport.cpp
102

103
  toolkit/transportman/TransportMan.cpp
104

105
106
  toolkit/aggregator/mpi/MPIAggregator.cpp
  toolkit/aggregator/mpi/MPIChain.cpp
107
108
109
)
target_include_directories(adios2
  PUBLIC
110
    $<BUILD_INTERFACE:${ADIOS2_SOURCE_DIR}/source>
111
112
    $<BUILD_INTERFACE:${ADIOS2_BINARY_DIR}/source>
    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
113
)
114
target_link_libraries(adios2 PRIVATE adios2sys_interface pugixml_private taustubs yaml-cpp)
115
target_link_libraries(adios2 PUBLIC ${CMAKE_THREAD_LIBS_INIT})
116
target_compile_features(adios2 PUBLIC ${ADIOS2_CXX11_FEATURES})
117

118
if(UNIX)
119
  target_sources(adios2 PRIVATE toolkit/transport/file/FilePOSIX.cpp)
120
121
endif()

122
if(ADIOS2_HAVE_SysVShMem)
William F Godoy's avatar
William F Godoy committed
123
124
  target_sources(adios2 PRIVATE toolkit/format/buffer/ipc/BufferSystemV.cpp)
  
125
  target_sources(adios2 PRIVATE toolkit/transport/shm/ShmSystemV.cpp)
126
127
endif()

Ruonan Wang's avatar
Ruonan Wang committed
128
if(ADIOS2_HAVE_ZeroMQ)
129
    target_sources(adios2 PRIVATE
Ruonan Wang's avatar
Ruonan Wang committed
130
131
        toolkit/zmq/zmqreqrep/ZmqReqRep.cpp
        toolkit/zmq/zmqpubsub/ZmqPubSub.cpp
132
133
        )
    target_link_libraries(adios2 PRIVATE ZeroMQ::ZMQ)
134
135
endif()

Junmin Gu's avatar
Junmin Gu committed
136
137
138
139
140
141
142
143
#if (ADIOS2_HAVE_JSON)
if (ADIOS2_HAVE_DataMan)
    target_sources(adios2 PRIVATE
	toolkit/query/JsonWorker.cpp			
   	)
    target_link_libraries(adios2 PRIVATE nlohmann_json)
endif()

144
if(ADIOS2_HAVE_DataMan OR ADIOS2_HAVE_Table)
Wang, Ruonan's avatar
Wang, Ruonan committed
145
    target_sources(adios2 PRIVATE
Axel Huebl's avatar
Axel Huebl committed
146
        toolkit/format/dataman/DataManSerializer.cpp
Wang, Ruonan's avatar
Wang, Ruonan committed
147
        toolkit/format/dataman/DataManSerializer.tcc
Axel Huebl's avatar
Axel Huebl committed
148
    )
Ruonan Wang's avatar
Ruonan Wang committed
149
150
151
152
153
154
    target_link_libraries(adios2 PRIVATE nlohmann_json)
endif()


if(ADIOS2_HAVE_DataMan)
    target_sources(adios2 PRIVATE
155
156
157
158
159
        engine/dataman/DataManCommon.cpp
        engine/dataman/DataManReader.cpp
        engine/dataman/DataManReader.tcc
        engine/dataman/DataManWriter.cpp
        engine/dataman/DataManWriter.tcc
Wang, Ruonan's avatar
Wang, Ruonan committed
160
        )
161
endif()
Ruonan Wang's avatar
Ruonan Wang committed
162

Ruonan Wang's avatar
Ruonan Wang committed
163
if(ADIOS2_HAVE_SSC)
164
    target_sources(adios2 PRIVATE
165
        helper/adiosMpiHandshake.h  helper/adiosMpiHandshake.cpp
Ruonan Wang's avatar
Ruonan Wang committed
166
167
168
169
        engine/ssc/SscReader.cpp
        engine/ssc/SscReader.tcc
        engine/ssc/SscWriter.cpp
        engine/ssc/SscWriter.tcc
170
        engine/ssc/SscHelper.cpp
Wang, Ruonan's avatar
Wang, Ruonan committed
171
172
        )
    target_link_libraries(adios2 PRIVATE nlohmann_json)
Ruonan Wang's avatar
Ruonan Wang committed
173
174
175
176
177
178
endif()

if(ADIOS2_HAVE_Table)
    target_sources(adios2 PRIVATE
        engine/table/TableWriter.cpp
        engine/table/TableWriter.tcc
Axel Huebl's avatar
Axel Huebl committed
179
    )
Jason Wang's avatar
Jason Wang committed
180
endif()
Ruonan Wang's avatar
Ruonan Wang committed
181

182
183
184
185
186
187
188
189
190
191
if(ADIOS2_HAVE_SST)
  add_subdirectory(toolkit/sst)
  target_sources(adios2 PRIVATE
    engine/sst/SstReader.cpp
    engine/sst/SstWriter.cpp
    engine/sst/SstParamParser.cpp
  )
  target_link_libraries(adios2 PRIVATE sst)
endif()

192
if(ADIOS2_HAVE_DataSpaces)
pradsubedi's avatar
pradsubedi committed
193
194
195
196
197
198
199
200
  target_sources(adios2 PRIVATE
     toolkit/dataspaces/ds_writer.c
     engine/dataspaces/DataSpacesWriter.cpp engine/dataspaces/DataSpacesWriter.tcc 
     engine/dataspaces/DataSpacesReader.cpp engine/dataspaces/DataSpacesReader.tcc 
  )
  target_link_libraries(adios2 PRIVATE DataSpaces::DataSpaces)
endif()

Godoy, William F's avatar
Godoy, William F committed
201
if(ADIOS2_HAVE_Blosc)
202
  target_sources(adios2 PRIVATE operator/compress/CompressBlosc.cpp)
Godoy, William F's avatar
Godoy, William F committed
203
204
  target_link_libraries(adios2 PRIVATE Blosc::Blosc)
endif()
205

206
if(ADIOS2_HAVE_BZip2)
William F Godoy's avatar
William F Godoy committed
207
  target_sources(adios2 PRIVATE operator/compress/CompressBZIP2.cpp)
208
209
210
  target_link_libraries(adios2 PRIVATE BZip2::BZip2)
endif()

211
if(ADIOS2_HAVE_ZFP)
William F Godoy's avatar
William F Godoy committed
212
  target_sources(adios2 PRIVATE operator/compress/CompressZFP.cpp)
213
  target_link_libraries(adios2 PRIVATE zfp::zfp)
214
endif()
215

216
217
218
219
220
if(ADIOS2_HAVE_SZ)
  target_sources(adios2 PRIVATE operator/compress/CompressSZ.cpp)
  target_link_libraries(adios2 PRIVATE SZ::SZ)
endif()

William F Godoy's avatar
William F Godoy committed
221
222
223
224
225
if(ADIOS2_HAVE_MGARD)
  target_sources(adios2 PRIVATE operator/compress/CompressMGARD.cpp)
  target_link_libraries(adios2 PRIVATE MGARD::MGARD)
endif()

William F Godoy's avatar
William F Godoy committed
226
227
228
229
230
if(ADIOS2_HAVE_PNG)
  target_sources(adios2 PRIVATE operator/compress/CompressPNG.cpp)
  target_link_libraries(adios2 PRIVATE PNG::PNG)
endif()

231
if(ADIOS2_HAVE_MPI)
232
  target_sources(adios2 PRIVATE
233
    core/IOMPI.cpp
234
    helper/adiosCommMPI.h  helper/adiosCommMPI.cpp
235
236
    engine/insitumpi/InSituMPIWriter.cpp engine/insitumpi/InSituMPIWriter.tcc
    engine/insitumpi/InSituMPIReader.cpp engine/insitumpi/InSituMPIReader.tcc
237
    engine/insitumpi/InSituMPIFunctions.cpp engine/insitumpi/InSituMPISchedules.cpp
238
  )
239
  target_link_libraries(adios2 PUBLIC MPI::MPI_C)
240
241
endif()

242
if(ADIOS2_HAVE_HDF5)
243
  target_sources(adios2 PRIVATE
244
    core/IOHDF5.cpp
245
246
247
248
249
    engine/hdf5/HDF5ReaderP.cpp
    engine/hdf5/HDF5WriterP.cpp
    toolkit/interop/hdf5/HDF5Common.cpp toolkit/interop/hdf5/HDF5Common.tcc
    )
  if(NOT HDF5_VERSION VERSION_LESS 1.11)
guj's avatar
guj committed
250
    target_sources(adios2 PRIVATE
251
      engine/mixer/HDFMixer.cpp
guj's avatar
guj committed
252
253
      engine/mixer/HDFMixer.tcc
      engine/mixer/HDFMixerWriter.cpp
254
      )
guj's avatar
guj committed
255
  endif()
256
  if(HDF5_IS_PARALLEL)
257
    set_property(SOURCE core/IOMPI.cpp APPEND PROPERTY COMPILE_DEFINITIONS ADIOS2_HAVE_HDF5_PARALLEL)
258
259
260
261
    target_sources(adios2 PRIVATE
      toolkit/interop/hdf5/HDF5CommonMPI.cpp
      )
  endif()
guj's avatar
guj committed
262

263
  target_link_libraries(adios2 PRIVATE ${HDF5_C_LIBRARIES})
264
265
266
267
268
269

  if(HDF5_C_INCLUDE_DIRS)
    target_include_directories(adios2 PRIVATE ${HDF5_C_INCLUDE_DIRS})
  else()
    target_include_directories(adios2 PRIVATE ${HDF5_INCLUDE_DIRS})
  endif()
270
271
endif()

272
273
# Set library version information
set_target_properties(adios2 PROPERTIES
274
  VERSION ${ADIOS2_LIBRARY_VERSION}
275
276
277
  SOVERSION ${ADIOS2_VERSION_MAJOR}
)

278
279
install(FILES common/ADIOSMacros.h common/ADIOSTypes.h common/ADIOSTypes.inl
  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/adios2/common
280
281
282
)

# Library installation
283
install(TARGETS adios2 taustubs EXPORT adios2Exports
284
285
286
287
  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)