CMakeLists.txt 8.17 KB
Newer Older
1 2
#*****************************************************************************
#
bonnell's avatar
bonnell committed
3
# Copyright (c) 2000 - 2015, Lawrence Livermore National Security, LLC
4
# Produced at the Lawrence Livermore National Laboratory
brugger's avatar
 
brugger committed
5
# LLNL-CODE-442911
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
# 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:
#
fogal1's avatar
fogal1 committed
39 40 41
#   Tom Fogal, Wed Aug  4 18:54:25 MDT 2010
#   Add multires operator.
#
42 43
#   Hank Childs, Sat Aug  7 03:39:33 PDT 2010
#   Add DataBinning operator.
fogal1's avatar
fogal1 committed
44
#
45 46 47
#   Hank Childs, Fri Sep 24 08:16:10 PDT 2010
#   Add SurfaceNormal, Flux, and ConnectedComponents operators.
#
48 49 50
#   Brad Whitlock, Wed Jun 22 15:25:18 PDT 2011
#   I added the Extrude operator.
#
mdurant's avatar
mdurant committed
51 52
#   Marc Durant, Tue Sep 6 2011
#   Added the FFT operator
53 54 55 56
#
#   Hank Childs, Mon Oct 31 09:38:27 PDT 2011
#   Add ToroidalPoloidalProjection on behalf of Hari Krishnan.
#
57 58 59
#   Cyrus Harrison, Fri Apr  6 10:03:51 PDT 2012
#   Renamed Ftle to FTLE.
#
60 61 62
#   Cyrus Harrison, Tue Sep 25 12:08:29 PDT 2012
#   Added CartographicProjection (from Jean Favre)
#
63 64 65
#   Kathleen Biagas, Thu Oct 11 11:48:27 PDT 2012
#   Make CartographicProjection dependent upon existence of GEOVIS vtk kit.
#
66 67 68 69 70
#   Kathleen Biagas, Mon May 12 12:59:25 PDT 2014
#   Prefer VISIT_SELECTED_OPERATOR_PLUGINS if defined.  Test for existence of
#   subdir before adding it.  Call VISIT_SELECTED_PLUGIN_ERROR macro if
#   necessary.
#
kgriffin's avatar
kgriffin committed
71 72 73
#   Kevin Griffin, Wed July 22 18:00:10 PDT 2015
#   Add SPH Resample Operator 
#
74
#****************************************************************************/
75 76 77 78 79
IF(NOT WIN32)
    SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${VISIT_PLUGIN_DIR}/operators)
ELSE(NOT WIN32)
    SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${VISIT_PLUGIN_DIR}/operators)
ENDIF(NOT WIN32)
80 81

SET(REQUIRED_OPERATOR_PLUGINS
ghweber's avatar
ghweber committed
82
AMRStitchCell
83 84 85 86
BoundaryOp
Box
Clip
Cone
87
ConnectedComponents
88 89 90 91
CoordSwap
CracksClipper
CreateBonds
Cylinder
92
DataBinning
93
Decimate
94
Delaunay
95 96 97
DeferExpression
Displace
DualMesh
98
Edge
99
Elevate
pugmire's avatar
pugmire committed
100
EllipsoidSlice
101
ExternalSurface
102
ExtractPointFunction2D
103
Extrude
mdurant's avatar
mdurant committed
104
FFT
105
FiveFoldTetSubdivision
106
Flux
allens's avatar
allens committed
107
LCS
108
IndexSelect
109
IntegralCurve
110 111 112
InverseGhostZone
Isosurface
Isovolume
hrchilds's avatar
hrchilds committed
113
Lagrangian
114
LimitCycle
115
Lineout
allens's avatar
allens committed
116
LineSampler
117
Merge
118
ModelFit
fogal1's avatar
fogal1 committed
119
MultiresControl
120 121
OnionPeel
PDF
122
PersistentParticles
123
#ProgrammableOp
124 125 126 127
Project
Reflect
Replicate
Resample
kgriffin's avatar
kgriffin committed
128
RadialResample
129 130 131 132
Revolve
Slice
Smooth
SphereSlice
kgriffin's avatar
kgriffin committed
133
SPHResample
134
Stagger
135
StatisticalTrends
136
SurfaceNormal
137 138
ThreeSlice
Threshold
139
ToroidalPoloidalProjection
140 141 142 143 144 145
Transform
TriangulateRegularPoints
Tube
ZoneDump
)

whitlocb's avatar
whitlocb committed
146 147 148 149 150 151 152
# Do not include Poincare on BlueGene/Q because it has a std::map symbol
# that prevents static linking of libpami.a which is needed by MPI on 
# that system.
IF(NOT BLUEGENEQ)
   SET(REQUIRED_OPERATOR_PLUGINS ${REQUIRED_OPERATOR_PLUGINS} Poincare)
ENDIF(NOT BLUEGENEQ)

153
#adding programmable operator only if Python is available.
154
#IF(VISIT_PYTHON_FILTERS OR VISIT_PYTHON_SCRIPTING)
155
#  IF(NOT DEFINED VISIT_SELECTED_OPERATOR_PLUGINS)
156
#    LIST(APPEND REQUIRED_OPERATOR_PLUGINS Script)
157
#  ENDIF()
158 159
#ENDIF(VISIT_PYTHON_FILTERS OR VISIT_PYTHON_SCRIPTING)

bonnell's avatar
bonnell committed
160
IF(TARGET vtkGeovisCore)
161
    LIST(APPEND REQUIRED_OPERATOR_PLUGINS CartographicProjection)
bonnell's avatar
bonnell committed
162
ELSE()
163 164 165 166 167 168 169
    IF(DEFINED VISIT_SELECTED_OPERATOR_PLUGINS)
        VISIT_SELECTED_PLUGIN_ERROR(OPERATOR
          "CartographicProjection"
          "library vtkGeovisCore not found")
    ELSE()
        MESSAGE(STATUS "CartographicProjection requires vtkGeovisCore")
    ENDIF()
170 171
ENDIF()

172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
SET(OPTIONAL_OPERATOR_PLUGINS
Context
ConnCompReduce
MetricThreshold
RemoveCells
SubdivideQuads
SurfCompPrep
)

SET(MINIMAL_OPERATOR_PLUGINS
Lineout
Slice
Threshold
)

# Select the plugins to build
188 189 190
IF(DEFINED VISIT_SELECTED_OPERATOR_PLUGINS)
    SET(BUILD_PLUGINS ${VISIT_SELECTED_OPERATOR_PLUGINS})
ELSEIF(VISIT_BUILD_ALL_PLUGINS)
191
    SET(BUILD_PLUGINS ${REQUIRED_OPERATOR_PLUGINS} ${OPTIONAL_OPERATOR_PLUGINS})
192
ELSE()
193 194 195 196 197
    IF(VISIT_BUILD_MINIMAL_PLUGINS)
        SET(BUILD_PLUGINS ${MINIMAL_OPERATOR_PLUGINS})
    ELSE(VISIT_BUILD_MINIMAL_PLUGINS)
        SET(BUILD_PLUGINS ${REQUIRED_OPERATOR_PLUGINS})
    ENDIF(VISIT_BUILD_MINIMAL_PLUGINS)
198
ENDIF()
199

200 201 202 203 204 205 206 207 208 209 210
#IF(HAVE_LIB_R)
#  IF(NOT DEFINED VISIT_SELECTED_OPERATOR_PLUGINS)
#      LIST(APPEND BUILD_PLUGINS ExtremeValueAnalysis)
#      LIST(APPEND BUILD_PLUGINS PeaksOverThreshold)
#      LIST(APPEND BUILD_PLUGINS ModelBasedClustering)
#  ENDIF()
#ELSE(HAVE_LIB_R)
#  VISIT_SELECTED_PLUGIN_ERROR(OPERATOR 
#      "ExtremeValueAnalysis;PeaksOverThreshold;ModelBasedClustering"
#      "R library not found")
#ENDIF(HAVE_LIB_R)
pugmire's avatar
pugmire committed
211

212 213
# Add the plugin directories
FOREACH(operator ${BUILD_PLUGINS})
214 215 216 217 218 219 220 221 222 223 224 225
    # (EXISTS test requires full path)
    IF(EXISTS ${VISIT_SOURCE_DIR}/operators/${operator})
        ADD_SUBDIRECTORY(${operator})
    ELSE()
        IF(DEFINED VISIT_SELECTED_OPERATOR_PLUGINS)
            Message(FATAL_ERROR "Selected operator (${operator}) does not exist.")
        ELSEIF(VISIT_STATIC)
            # for code below, remove anything we aren't actually building
            Message("${operator} removed from build because it does not exist")
            LIST(REMOVE_ITEM BUILD_PLUGINS ${operator})
        ENDIF()
    ENDIF()
226 227
ENDFOREACH(operator)

228 229
# If we're building statically, make various main programs depend on plugins
# being built
230
IF(VISIT_STATIC)
231 232
    # Write a file containing the list of plugins such that we can include it
    # into C++ code.
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
    FOREACH(operator ${BUILD_PLUGINS})
        SET(operatorCode "${operatorCode}PLUGIN_VERB(${operator})\n")
    ENDFOREACH(operator)
    FILE(WRITE ${VISIT_BINARY_DIR}/include/enabled_operators.h "${operatorCode}")

    IF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY)
        CREATE_PLUGIN_DEPENDENCIES(gui_exe "I" "Operator" ${BUILD_PLUGINS})
        CREATE_PLUGIN_DEPENDENCIES(gui_exe "G" "Operator" ${BUILD_PLUGINS})

        CREATE_PLUGIN_DEPENDENCIES(viewer_exe "I" "Operator" ${BUILD_PLUGINS})
        CREATE_PLUGIN_DEPENDENCIES(viewer_exe "V" "Operator" ${BUILD_PLUGINS})

        IF(VISIT_PYTHON_SCRIPTING)
            CREATE_PLUGIN_DEPENDENCIES(cli "I" "Operator" ${BUILD_PLUGINS})
            CREATE_PLUGIN_DEPENDENCIES(cli "S" "Operator" ${BUILD_PLUGINS})
        ENDIF(VISIT_PYTHON_SCRIPTING)
    ENDIF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY)

    CREATE_PLUGIN_DEPENDENCIES(engine_ser_exe "I" "Operator" ${BUILD_PLUGINS})
    CREATE_PLUGIN_DEPENDENCIES(engine_ser_exe "E" "Operator_ser" ${BUILD_PLUGINS})

    IF(VISIT_PARALLEL)
        CREATE_PLUGIN_DEPENDENCIES(engine_par_exe "I" "Operator" ${BUILD_PLUGINS})
        CREATE_PLUGIN_DEPENDENCIES(engine_par_exe "E" "Operator_par" ${BUILD_PLUGINS})
    ENDIF(VISIT_PARALLEL)
ENDIF(VISIT_STATIC)