CMakeLists.txt 11.2 KB
Newer Older
1
2
#*****************************************************************************
#
brugger's avatar
 
brugger committed
3
# Copyright (c) 2000 - 2011, Lawrence Livermore National Security, LLC
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
# Produced at the Lawrence Livermore National Laboratory
# LLNL-CODE-400142
# All rights reserved.
#
# This file is  part of VisIt. For  details, see https://visit.llnl.gov/.  The
# full copyright notice is contained in the file COPYRIGHT located at the root
# of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
#
# Redistribution  and  use  in  source  and  binary  forms,  with  or  without
# modification, are permitted provided that the following conditions are met:
#
#  - Redistributions of  source code must  retain the above  copyright notice,
#    this list of conditions and the disclaimer below.
#  - Redistributions in binary form must reproduce the above copyright notice,
#    this  list of  conditions  and  the  disclaimer (as noted below)  in  the
#    documentation and/or other materials provided with the distribution.
#  - Neither the name of  the LLNS/LLNL nor the names of  its contributors may
#    be used to endorse or promote products derived from this software without
#    specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT  HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR  IMPLIED WARRANTIES, INCLUDING,  BUT NOT  LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS FOR A PARTICULAR  PURPOSE
# ARE  DISCLAIMED. IN  NO EVENT  SHALL LAWRENCE  LIVERMORE NATIONAL  SECURITY,
# LLC, THE  U.S.  DEPARTMENT OF  ENERGY  OR  CONTRIBUTORS BE  LIABLE  FOR  ANY
# DIRECT,  INDIRECT,   INCIDENTAL,   SPECIAL,   EXEMPLARY,  OR   CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT  LIMITED TO, PROCUREMENT OF  SUBSTITUTE GOODS OR
# SERVICES; LOSS OF  USE, DATA, OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER
# CAUSED  AND  ON  ANY  THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT
# LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)  ARISING IN ANY  WAY
# OUT OF THE  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#
# Modifications:
38
39
#    Jeremy Meredith, Thu Jan 14 12:32:46 EST 2010
#    Added Rect and Hex back to the optional plugins.
40
#
41
42
43
#    Brad Whitlock, Wed Feb 10 10:02:53 PST 2010
#    I added the contributed Velodyne plugin to the build.
#
44
45
46
47
#    Hank Childs, Sat Feb 20 09:13:11 PST 2010
#    Added Vs plugin.  Plugin has been available for a while, but we weren't
#    generating a Makefile for it.
#
brugger's avatar
 
brugger committed
48
49
50
#    Eric Brugger, Wed Feb 24 09:27:11 PST 2010
#    I added the paraDIS and paraDIS_tecplot plugins to the build.
#
brugger's avatar
 
brugger committed
51
#    Eric Brugger, Wed Feb 24 17:46:10 PST 2010
brugger's avatar
 
brugger committed
52
53
54
55
56
57
#    I temporalily removed the paraDIS and paraDIS_tecplot plugins from
#    the build since they don't build.
#
#    Eric Brugger, Fri Feb 26 10:20:38 PST 2010
#    I added back the paraDIS and paraDIS_tecplot plugins to the build since
#    they now build.
brugger's avatar
 
brugger committed
58
#
59
60
61
62
#    Eric Brugger, Thu Mar  4 14:31:45 PST 2010
#    I deleted the PlasmaState plugin from the build since it no longer
#    exists.
#
63
#    Cyrus Harrison, Thu Mar 18 17:07:55 PDT 2010
64
65
#    Temporarily removed the paraDIS due to a build issue.
#
66
67
68
#    Cyrus Harrison, Mon Mar 22 09:01:32 PDT 2010
#    Added back paraDIS after build issue was resolved.
#
69
70
71
72
73
#    Brad Whitlock, Mon Apr 26 13:35:37 PST 2010
#    I made Xdmf use the Xdmf library. I renamed our old XDMF reader to 
#    VisItXdmf and I made it get used when the Xdmf reader that uses the
#    Xdmf library is not available.
#
74
75
76
#    Kathleen Bonnell, Wed May 5 12:04:22 PST 2010 
#    Enable VASP reader on windows. 
#
fogal1's avatar
fogal1 committed
77
78
79
#    Tom Fogal, Wed Aug  4 15:14:56 MDT 2010
#    Build STAR database.
#
fogal1's avatar
fogal1 committed
80
81
82
#    Tom Fogal, Tue Aug 10 17:35:23 MDT 2010
#    Don't build STAR on Windows.
#
js9's avatar
js9 committed
83
84
85
#    Jeremy Meredith, Thu Aug 12 13:54:57 EDT 2010
#    Added PuReMD.
#
86
87
#    Mark C. Miller, Sun Aug 29 23:35:37 PDT 2010
#    Fixed support for DBIO-ONLY build.
88
89
90
91
#
#    Brad Whitlock, Fri Oct 22 15:06:17 PDT 2010
#    I added a GMV reader.
#
brugger's avatar
 
brugger committed
92
93
94
#    Eric Brugger, Fri Jan  7 13:35:31 PST 2011
#    I replaced the BOXLIB2D and BOXLIB3D variables with just BOXLIB.
#
95
96
97
#    Brad Whitlock, Wed Feb 23 11:52:22 PST 2011
#    Add VelodyneCLE "AMR" plugin from Corvid.
#
brugger's avatar
 
brugger committed
98
99
100
#    Eric Brugger, Wed Mar 30 11:58:31 PDT 2011
#    I added the lata database reader contributed by CEA.
#
brugger's avatar
 
brugger committed
101
102
103
#    Eric Brugger, Mon Apr  4 10:05:55 PDT 2011
#    I temporarily disabled the ITAPS readers since they aren't compiling.
#
miller86's avatar
miller86 committed
104
105
#    Mark C. Miller, Mon Apr  4 23:56:43 PDT 2011
#    Re-enabled ITAPS after fixing config-site file
whitlocb's avatar
whitlocb committed
106
107
108
109
#
#    Brad Whitlock, Thu May  5 10:12:18 PDT 2011
#    Add CaleHDF5 by Rob Managan.
#
110
111
112
#    Oliver Ruebel, Thu May 12 11:30 PDT 2011
#    I added a CUBE reader
#
113
114
115
#    Hank Childs, Thu Aug  4 13:22:36 PDT 2011
#    Add VCell reader on behalf of Ed Boyce and UCHC team.
#
whitlocb's avatar
whitlocb committed
116
117
118
#    Brad Whitlock, Wed Aug 10 16:19:42 PDT 2011
#    Add volimage reader for WPP code team.
#
119
#****************************************************************************/
120

121
122
123
124
125
126
IF(NOT WIN32)
    SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${VISIT_PLUGIN_DIR}/databases)
ELSE(NOT WIN32)
    SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${VISIT_PLUGIN_DIR}/databases)
ENDIF(NOT WIN32)

127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
SET(THIRDPARTY_DEPENDENT_PLUGINS)

MACRO(THIRDPARTY_DEPENDENT_PLUGINS libname targets)
    SET(alltargets ${targets})
    FOREACH (X ${ARGN})
       SET(alltargets ${alltargets} ${X})
    ENDFOREACH (X ${ARGN})
    SET(libname2 "${libname}_FOUND")
    IF(${libname2})
        IF(VISIT_STATIC)
            SET(libdir "${libname}_LIBRARY_DIR")
            SET(libs "${libname}_LIB")
            IF(${libdir})
                SET(TMP_THIRDPARTY_IO_LIBRARY_DIR ${TMP_THIRDPARTY_IO_LIBRARY_DIR} ${${libdir}})
            ENDIF(${libdir})
            IF(${libs})
143
144
145
146
147
148
                FOREACH(lib ${${libs}})
                    LIST(FIND TMP_THIRDPARTY_IO_LIB ${lib} findVar)
                    IF(findVar EQUAL -1)
                        SET(TMP_THIRDPARTY_IO_LIB ${TMP_THIRDPARTY_IO_LIB} ${lib})
                    ENDIF(findVar EQUAL -1)
                ENDFOREACH(lib)
149
150
151
152
153
154
155
156
157
158
159
160
161
            ENDIF(${libs})
        ENDIF(VISIT_STATIC)
        SET(THIRDPARTY_DEPENDENT_PLUGINS ${THIRDPARTY_DEPENDENT_PLUGINS} ${alltargets})
    ENDIF(${libname2})
ENDMACRO(THIRDPARTY_DEPENDENT_PLUGINS libname targets)

# These are the various targets that are optional since they depend on 3rd-
# party I/O libraries to be present. We pass the name of the 3rd party library
# to THIRDPARTY_DEPENDENT_PLUGINS and it checks whether there is a HAVE_XXXX
# symbol defined for that library. If so, the targets that use that 3rd party
# library are added to the mix.
UNSET(TMP_THIRDPARTY_IO_LIBRARY_DIR)
UNSET(TMP_THIRDPARTY_IO_LIB)
162
THIRDPARTY_DEPENDENT_PLUGINS(ADIOS    ADIOS)
163
THIRDPARTY_DEPENDENT_PLUGINS(ADVIO    Adventure)
brugger's avatar
 
brugger committed
164
THIRDPARTY_DEPENDENT_PLUGINS(BOXLIB   Boxlib2D Boxlib3D)
165
166
167
168
169
THIRDPARTY_DEPENDENT_PLUGINS(CCMIO    CCM)
THIRDPARTY_DEPENDENT_PLUGINS(CFITSIO  FITS)
THIRDPARTY_DEPENDENT_PLUGINS(CGNS     CGNS)
THIRDPARTY_DEPENDENT_PLUGINS(EXODUSII Exodus TimeVaryingExodus)
THIRDPARTY_DEPENDENT_PLUGINS(GDAL     GDAL)
170
THIRDPARTY_DEPENDENT_PLUGINS(HDF4     Cosmos ZeusMP)
171
172
173
IF(NOT XDMF_FOUND)
    SET(XDMF_READER VisItXdmf)
ENDIF(NOT XDMF_FOUND)
174
THIRDPARTY_DEPENDENT_PLUGINS(HDF5     
175
AMR
whitlocb's avatar
whitlocb committed
176
CaleHDF5
177
178
Chombo
CosmosPP
179
Enzo
180
FLASH
allens's avatar
allens committed
181
Geqdsk
182
183
184
185
186
187
188
189
190
GTC
H5Nimrod
M3D
M3DC1
PFLOTRAN
Pixie
SAMRAI
Tetrad
UNIC
191
Velodyne
192
Vs
193
${XDMF_READER}
194
)
allens's avatar
allens committed
195
THIRDPARTY_DEPENDENT_PLUGINS(MDSPLUS  MDSplus)
196
197
THIRDPARTY_DEPENDENT_PLUGINS(H5PART   H5Part)
THIRDPARTY_DEPENDENT_PLUGINS(MILI     Mili)
198
THIRDPARTY_DEPENDENT_PLUGINS(NETCDF   NETCDF S3D)
199
200
201
202
203
204
IF (NOT WIN32)
    THIRDPARTY_DEPENDENT_PLUGINS(SILO     Cale KullLite PDB Silo SAMI Vista)
ELSE (NOT WIN32)
    THIRDPARTY_DEPENDENT_PLUGINS(SILO     Cale KullLite PDB Silo SAMI)
ENDIF (NOT WIN32)
THIRDPARTY_DEPENDENT_PLUGINS(VISUS    ViSUS)
205
THIRDPARTY_DEPENDENT_PLUGINS(XDMF     Xdmf)
brugger's avatar
 
brugger committed
206
207
208
IF (WIN32)
    THIRDPARTY_DEPENDENT_PLUGINS(ZLIB     VCellMTMD)
ENDIF (WIN32)
209
210

# Add ITAPS
miller86's avatar
miller86 committed
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
IF(ITAPS_DIRS)
    SET(THIRDPARTY_DEPENDENT_PLUGINS ${THIRDPARTY_DEPENDENT_PLUGINS} ${ITAPS_DIRS})
    IF(VISIT_STATIC)
        FOREACH(impl ${ITAPS_DIRS})
            SET(itapslib "${impl}_LIB")
            IF(${itapslib})
                SET(TMP_THIRDPARTY_IO_LIB ${TMP_THIRDPARTY_IO_LIB} ${${itapslib}})
            ENDIF(${itapslib})
            SET(itapslibdir "${impl}_LIBRARY_DIR")
            IF(${itapslibdir})
                SET(TMP_THIRDPARTY_IO_LIBRARY_DIR ${TMP_THIRDPARTY_IO_LIBRARY_DIR} ${${itapslibdir}})
            ENDIF(${itapslibdir})
        ENDFOREACH(impl)
    ENDIF(VISIT_STATIC)
ENDIF(ITAPS_DIRS)
226
227
228
229
230
231
232
233
234
235
236
237
238
239

# Save the list of all library dirs and libs so the engine can use it
IF(VISIT_STATIC)
    SET(ALL_THIRDPARTY_IO_LIBRARY_DIR ${TMP_THIRDPARTY_IO_LIBRARY_DIR} CACHE INTERNAL "List of all I/O lib dirs")
    SET(ALL_THIRDPARTY_IO_LIB ${TMP_THIRDPARTY_IO_LIB} CACHE INTERNAL "List of all I/O libs")
ENDIF(VISIT_STATIC)

# These are our required plugins (no external dependencies)
SET(REQUIRED_DATABASE_PLUGINS
ANALYZE
ANSYS
AUXFile
AugDecomp
BOV
whitlocb's avatar
whitlocb committed
240
BOW
241
242
243
CEAucd
CMAT
CTRL
244
Cube
245
246
247
248
249
250
251
Curve2D
DDCMD
Dyna3D
EnSight
ExtrudedVol
Fluent
GGCM
252
GMV
253
GULP
254
255
256
257
258
259
260
261
262
263
264
265
Gadget
Image
LAMMPS
Lines
MFIX
MM5
Miranda
NASTRAN
Nek5000
OVERFLOW
OpenFOAM
PATRAN
js9's avatar
js9 committed
266
PuReMD
267
268
269
270
271
272
273
274
275
276
PLOT2D
PLOT3D
PlainText
Point3D
ProteinDataBank
RAW
SAR
SAS
STL
Shapefile
whitlocb's avatar
 
whitlocb committed
277
SimV2
278
279
280
281
Spheral
TFT
TSurf
Tecplot
282
VASP
283
284
285
286
VTK
WavefrontOBJ
XYZ
Xmdv
brugger's avatar
 
brugger committed
287
lata
allens's avatar
allens committed
288
289
paraDIS
paraDIS_tecplot
whitlocb's avatar
whitlocb committed
290
volimage
291
292
293
294
295
)

IF (NOT WIN32)
    LIST(APPEND REQUIRED_DATABASE_PLUGINS 
        Claw
fogal1's avatar
fogal1 committed
296
        STAR
brugger's avatar
 
brugger committed
297
        VCellMTMD
298
299
300
        Vis5D
        ZipWrapper
    )
301
    IF(NOT VISIT_STATIC AND NOT VISIT_DBIO_ONLY)
whitlocb's avatar
 
whitlocb committed
302
        LIST(APPEND REQUIRED_DATABASE_PLUGINS SimV1 SimV1Writer)
303
    ENDIF(NOT VISIT_STATIC AND NOT VISIT_DBIO_ONLY)
304
    SET(OPTIONAL_DATABASE_PLUGINS
305
306
        Hex
        Rect
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
348
349
350
351
352
        VLI
    )
ENDIF (NOT WIN32)


SET(MINIMAL_DATABASE_PLUGINS
Curve2D
RAW
VTK
)

# Select the plugins to build
IF(VISIT_BUILD_ALL_PLUGINS)
    SET(BUILD_PLUGINS ${REQUIRED_DATABASE_PLUGINS} ${THIRDPARTY_DEPENDENT_PLUGINS} ${OPTIONAL_DATABASE_PLUGINS})
ELSE(VISIT_BUILD_ALL_PLUGINS)
    IF(VISIT_BUILD_MINIMAL_PLUGINS)
        SET(BUILD_PLUGINS ${MINIMAL_DATABASE_PLUGINS})
    ELSE(VISIT_BUILD_MINIMAL_PLUGINS)
        SET(BUILD_PLUGINS ${REQUIRED_DATABASE_PLUGINS} ${THIRDPARTY_DEPENDENT_PLUGINS})
    ENDIF(VISIT_BUILD_MINIMAL_PLUGINS)
ENDIF(VISIT_BUILD_ALL_PLUGINS)

# Add the plugin directories
FOREACH(db ${BUILD_PLUGINS})
    ADD_SUBDIRECTORY(${db})
ENDFOREACH(db)

# If we're building statically, make various main programs depend on plugins being built
IF(VISIT_STATIC)
    # Write a file containing the list of plugins such that we can include it into C++ code.
    FOREACH(db ${BUILD_PLUGINS})
        SET(dbCode "${dbCode}PLUGIN_VERB(${db})\n")
    ENDFOREACH(db)
    FILE(WRITE ${VISIT_BINARY_DIR}/include/enabled_databases.h "${dbCode}")

    IF(NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
        CREATE_PLUGIN_DEPENDENCIES(mdserver "I" "Database" ${BUILD_PLUGINS})
        CREATE_PLUGIN_DEPENDENCIES(mdserver "M" "Database" ${BUILD_PLUGINS})
    ENDIF(NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
    CREATE_PLUGIN_DEPENDENCIES(engine_ser_exe "I" "Database" ${BUILD_PLUGINS})
    CREATE_PLUGIN_DEPENDENCIES(engine_ser_exe "E" "Database_ser" ${BUILD_PLUGINS})
    IF(VISIT_PARALLEL)
        CREATE_PLUGIN_DEPENDENCIES(engine_par_exe "I" "Database" ${BUILD_PLUGINS})
        CREATE_PLUGIN_DEPENDENCIES(engine_par_exe "E" "Database_par" ${BUILD_PLUGINS})
    ENDIF(VISIT_PARALLEL)
ENDIF(VISIT_STATIC)