Commit dc8f2868 authored by bonnell's avatar bonnell

Add ability to specify which plugins should be built

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23318 18c085ea-50e0-402c-830e-de6fd14e8384
parent b8b2489f
......@@ -374,6 +374,9 @@
# I added -DMPI_NO_CPPBIND to the VISIT_PARALLEL_CFLAGS and
# VISIT_PARALLEL_CXXFLAGS.
#
# Kathleen Biagas, Mon May 12 12:58:02 PDT 2014
# Add VISIT_SELECTED_PLUGIN_ERROR macro.
#
#****************************************************************************/
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
......@@ -2332,6 +2335,17 @@ FUNCTION(ADD_TARGET_LINK_FLAGS target)
ADD_TARGET_XXX_FLAGS(${target} LINK_FLAGS ${ARGN})
ENDFUNCTION(ADD_TARGET_LINK_FLAGS target)
macro(VISIT_SELECTED_PLUGIN_ERROR type plist msg)
if(DEFINED VISIT_SELECTED_${type}_PLUGINS)
foreach(plug ${plist})
list(FIND VISIT_SELECTED_${type}_PLUGINS ${plug} foundPlug)
if(NOT foundPlug EQUAL -1)
message(FATAL_ERROR "Cannot build selected plugin (${plug}): ${msg}")
endif()
endforeach()
endif()
endmacro()
IF(NOT VISIT_DBIO_ONLY)
ADD_SUBDIRECTORY(plots)
ADD_SUBDIRECTORY(operators)
......
......@@ -165,6 +165,11 @@
# I moved the AMRTest reader from the optional list of databases to
# build to the required list of databases to build.
#
# Kathleen Biagas, Mon May 12 12:59:25 PDT 2014
# Prefer VISIT_SELECTED_DATABASE_PLUGINS if defined. Test for existence of
# subdir before adding it. Call VISIT_SELECTED_PLUGIN_ERROR macro if
# necessary.
#
#****************************************************************************/
IF(NOT WIN32)
......@@ -175,7 +180,7 @@ ENDIF(NOT WIN32)
SET(THIRDPARTY_DEPENDENT_PLUGINS)
MACRO(THIRDPARTY_DEPENDENT_PLUGINS libname targets)
MACRO(CHECK_THIRDPARTY_DEPENDENT_PLUGINS libname targets)
SET(alltargets ${targets})
FOREACH (X ${ARGN})
SET(alltargets ${alltargets} ${X})
......@@ -197,16 +202,20 @@ MACRO(THIRDPARTY_DEPENDENT_PLUGINS libname targets)
ENDFOREACH(lib)
ENDIF(${libs})
ENDIF(VISIT_STATIC)
# Add each target individually so we can check if it is already in the list. It might
# be in the list already if it might depend on multiple libraries (H5PART, FASTBIT)
# Add each target individually so we can check if it is already in the
# list. It might be in the list already if it might depend on multiple
# libraries (H5PART, FASTBIT)
FOREACH(target ${alltargets})
LIST(FIND THIRDPARTY_DEPENDENT_PLUGINS ${target} findVar)
IF(findVar EQUAL -1)
SET(THIRDPARTY_DEPENDENT_PLUGINS ${THIRDPARTY_DEPENDENT_PLUGINS} ${target})
ENDIF(findVar EQUAL -1)
ENDFOREACH(target)
ELSE(${libname2})
VISIT_SELECTED_PLUGIN_ERROR(DATABASE ${alltargets} " third party dependency not found: ${libname}")
ENDIF(${libname2})
ENDMACRO(THIRDPARTY_DEPENDENT_PLUGINS libname targets)
ENDMACRO(CHECK_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
......@@ -218,20 +227,20 @@ UNSET(TMP_THIRDPARTY_IO_LIB)
# HDF5-related plugins (HDF5 comes last due to static link order)
IF (NOT WIN32)
THIRDPARTY_DEPENDENT_PLUGINS(SILO Cale KullLite PDB Silo SAMI Vista)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(SILO Cale KullLite PDB Silo SAMI Vista)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(FASTBIT H5Part)
ELSE (NOT WIN32)
THIRDPARTY_DEPENDENT_PLUGINS(SILO Cale KullLite PDB Silo SAMI)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(SILO Cale KullLite PDB Silo SAMI)
ENDIF (NOT WIN32)
THIRDPARTY_DEPENDENT_PLUGINS(CGNS CGNS)
THIRDPARTY_DEPENDENT_PLUGINS(FASTBIT H5Part)
THIRDPARTY_DEPENDENT_PLUGINS(H5PART H5Part)
THIRDPARTY_DEPENDENT_PLUGINS(NETCDF NETCDF S3D Exodus )
THIRDPARTY_DEPENDENT_PLUGINS(NETCDF_CXX MFIXCDF)
THIRDPARTY_DEPENDENT_PLUGINS(XDMF Xdmf)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(CGNS CGNS)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(H5PART H5Part)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(NETCDF NETCDF S3D Exodus )
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(NETCDF_CXX MFIXCDF)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(XDMF Xdmf)
IF(NOT XDMF_FOUND)
SET(XDMF_READER VisItXdmf)
ENDIF(NOT XDMF_FOUND)
THIRDPARTY_DEPENDENT_PLUGINS(HDF5
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(HDF5
AMR
BATL
CaleHDF5
......@@ -257,18 +266,18 @@ ${XDMF_READER}
)
# Non-HDF5-related plugins
THIRDPARTY_DEPENDENT_PLUGINS(ADIOS ADIOS)
THIRDPARTY_DEPENDENT_PLUGINS(ADVIO Adventure)
THIRDPARTY_DEPENDENT_PLUGINS(BOXLIB Boxlib2D Boxlib3D)
THIRDPARTY_DEPENDENT_PLUGINS(CCMIO CCM)
THIRDPARTY_DEPENDENT_PLUGINS(CFITSIO FITS)
THIRDPARTY_DEPENDENT_PLUGINS(GDAL GDAL)
THIRDPARTY_DEPENDENT_PLUGINS(HDF4 Cosmos ZeusMP)
THIRDPARTY_DEPENDENT_PLUGINS(MDSPLUS MDSplus)
THIRDPARTY_DEPENDENT_PLUGINS(MILI Mili)
THIRDPARTY_DEPENDENT_PLUGINS(UINTAH Uintah)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(ADIOS ADIOS)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(ADVIO Adventure)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(BOXLIB Boxlib2D Boxlib3D)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(CCMIO CCM)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(CFITSIO FITS)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(GDAL GDAL)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(HDF4 Cosmos ZeusMP)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(MDSPLUS MDSplus)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(MILI Mili)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(UINTAH Uintah)
IF (WIN32)
THIRDPARTY_DEPENDENT_PLUGINS(ZLIB VCellMTMD)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(ZLIB VCellMTMD)
ENDIF (WIN32)
# Add ITAPS
......@@ -370,15 +379,25 @@ ${XDBPLUGIN}
IF(TARGET vtkIOEnSight)
LIST(APPEND REQUIRED_DATABASE_PLUGINS EnSight)
ELSE()
MESSAGE(STATUS "EnSight plugin requires vtkIOEnSight")
IF(DEFINED VISIT_SELECTED_DATABASE_PLUGINS)
VISIT_SELECTED_PLUGIN_ERROR(DATABASE "EnSight" "EnSight plugin requires vtkIOEnSight")
ELSE()
MESSAGE(STATUS "EnSight plugin requires vtkIOEnSight")
ENDIF()
ENDIF(TARGET vtkIOEnSight)
IF (Boost_USABLE_PARADIS AND NOT WIN32)
LIST(APPEND REQUIRED_DATABASE_PLUGINS
paraDIS
paraDIS_tecplot
)
ENDIF (Boost_USABLE_PARADIS AND NOT WIN32)
IF(NOT WIN32)
IF (Boost_USABLE_PARADIS)
LIST(APPEND REQUIRED_DATABASE_PLUGINS
paraDIS
paraDIS_tecplot
)
ELSE()
VISIT_SELECTED_PLUGIN_ERROR(DATABASE "paraDIS;paraDIS_tecplot" "Useable boost libraries not found.")
ENDIF()
ELSE(NOT WIN32)
VISIT_SELECTED_PLUGIN_ERROR(DATABASE "paraDIS;paraDIS_tecplot" "not currently buildable on Windows")
ENDIF (NOT WIN32)
IF (NOT WIN32)
LIST(APPEND REQUIRED_DATABASE_PLUGINS
......@@ -397,6 +416,8 @@ IF (NOT WIN32)
Rect
VLI
)
ELSE(NOT WIN32)
VISIT_SELECTED_PLUGIN_ERROR(DATABASE "Claw;STAR;Vis5D;ZipWrapper;Hex;MRTest;PICS_Tester;Rect;VLI;SimV1;SimV1Writer" "not currently buildable on Windows")
ENDIF (NOT WIN32)
......@@ -408,19 +429,32 @@ PICS_Tester
)
# Select the plugins to build
IF(VISIT_BUILD_ALL_PLUGINS)
IF(DEFINED VISIT_SELECTED_DATABASE_PLUGINS)
SET(BUILD_PLUGINS ${VISIT_SELECTED_DATABASE_PLUGINS})
ELSEIF(VISIT_BUILD_ALL_PLUGINS)
SET(BUILD_PLUGINS ${REQUIRED_DATABASE_PLUGINS} ${THIRDPARTY_DEPENDENT_PLUGINS} ${OPTIONAL_DATABASE_PLUGINS})
ELSE(VISIT_BUILD_ALL_PLUGINS)
ELSE()
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)
ENDIF()
# Add the plugin directories
FOREACH(db ${BUILD_PLUGINS})
ADD_SUBDIRECTORY(${db})
# EXISTS test requires full path
IF(EXISTS ${VISIT_SOURCE_DIR}/databases/${db})
ADD_SUBDIRECTORY(${db})
ELSE()
IF(DEFINED VISIT_SELECTED_DATABASE_PLUGINS)
Message(FATAL_ERROR "Selected database (${db}) does not exist.")
ELSEIF(VISIT_STATIC)
# for code below, remove anything we aren't actually building
Message("${db} removed from build because it code does not exist")
LIST(REMOVE_ITEM BUILD_PLUGINS ${db})
ENDIF()
ENDIF()
ENDFOREACH(db)
# If we're building statically, make various main programs depend on plugins being built
......
......@@ -63,6 +63,11 @@
# Kathleen Biagas, Thu Oct 11 11:48:27 PDT 2012
# Make CartographicProjection dependent upon existence of GEOVIS vtk kit.
#
# 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.
#
#****************************************************************************/
IF(NOT WIN32)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${VISIT_PLUGIN_DIR}/operators)
......@@ -132,15 +137,23 @@ Tube
ZoneDump
)
#adding programmable operator only if Python is available..
#adding programmable operator only if Python is available.
#IF(VISIT_PYTHON_FILTERS OR VISIT_PYTHON_SCRIPTING)
# IF(NOT DEFINED VISIT_SELECTED_OPERATOR_PLUGINS)
# LIST(APPEND REQUIRED_OPERATOR_PLUGINS Script)
# ENDIF()
#ENDIF(VISIT_PYTHON_FILTERS OR VISIT_PYTHON_SCRIPTING)
IF(TARGET vtkGeovisCore)
LIST(APPEND REQUIRED_OPERATOR_PLUGINS CartographicProjection)
ELSE()
MESSAGE(STATUS "CartographicProjection requires vtkGeovisCore")
IF(DEFINED VISIT_SELECTED_OPERATOR_PLUGINS)
VISIT_SELECTED_PLUGIN_ERROR(OPERATOR
"CartographicProjection"
"library vtkGeovisCore not found")
ELSE()
MESSAGE(STATUS "CartographicProjection requires vtkGeovisCore")
ENDIF()
ENDIF()
SET(OPTIONAL_OPERATOR_PLUGINS
......@@ -159,30 +172,51 @@ Threshold
)
# Select the plugins to build
IF(VISIT_BUILD_ALL_PLUGINS)
IF(DEFINED VISIT_SELECTED_OPERATOR_PLUGINS)
SET(BUILD_PLUGINS ${VISIT_SELECTED_OPERATOR_PLUGINS})
ELSEIF(VISIT_BUILD_ALL_PLUGINS)
SET(BUILD_PLUGINS ${REQUIRED_OPERATOR_PLUGINS} ${OPTIONAL_OPERATOR_PLUGINS})
ELSE(VISIT_BUILD_ALL_PLUGINS)
ELSE()
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)
ENDIF(VISIT_BUILD_ALL_PLUGINS)
ENDIF()
IF(HAVE_LIB_R)
LIST(APPEND BUILD_PLUGINS ExtremeValueAnalysis)
LIST(APPEND BUILD_PLUGINS PeaksOverThreshold)
LIST(APPEND BUILD_PLUGINS ModelBasedClustering)
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)
# Add the plugin directories
FOREACH(operator ${BUILD_PLUGINS})
ADD_SUBDIRECTORY(${operator})
# (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()
ENDFOREACH(operator)
# If we're building statically, make various main programs depend on plugins being built
# 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.
# Write a file containing the list of plugins such that we can include it
# into C++ code.
FOREACH(operator ${BUILD_PLUGINS})
SET(operatorCode "${operatorCode}PLUGIN_VERB(${operator})\n")
ENDFOREACH(operator)
......
......@@ -35,6 +35,9 @@
# DAMAGE.
#
# Modifications:
# Kathleen Biagas, Mon May 12 12:59:25 PDT 2014
# Prefer VISIT_SELECTED_PLOT_PLUGINS if defined. Test for existence of
# subdir before adding it.
#
#****************************************************************************/
IF(NOT WIN32)
......@@ -78,24 +81,39 @@ Pseudocolor
)
# Select the plugins to build
IF(VISIT_BUILD_ALL_PLUGINS)
IF(DEFINED VISIT_SELECTED_PLOT_PLUGINS)
SET(BUILD_PLUGINS ${VISIT_SELECTED_PLOT_PLUGINS})
ELSEIF(VISIT_BUILD_ALL_PLUGINS)
SET(BUILD_PLUGINS ${REQUIRED_PLOT_PLUGINS} ${OPTIONAL_PLOT_PLUGINS})
ELSE(VISIT_BUILD_ALL_PLUGINS)
ELSE()
IF(VISIT_BUILD_MINIMAL_PLUGINS)
SET(BUILD_PLUGINS ${MINIMAL_PLOT_PLUGINS})
ELSE(VISIT_BUILD_MINIMAL_PLUGINS)
SET(BUILD_PLUGINS ${REQUIRED_PLOT_PLUGINS})
ENDIF(VISIT_BUILD_MINIMAL_PLUGINS)
ENDIF(VISIT_BUILD_ALL_PLUGINS)
ENDIF()
# Add the plugin directories
FOREACH(plot ${BUILD_PLUGINS})
ADD_SUBDIRECTORY(${plot})
# (EXISTS test requires full path)
IF(EXISTS ${VISIT_SOURCE_DIR}/plots/${plot})
ADD_SUBDIRECTORY(${plot})
ELSE()
IF(DEFINED VISIT_SELECTED_PLOT_PLUGINS)
Message(FATAL_ERROR "Selected plot (${plot}) does not exist.")
ELSEIF(VISIT_STATIC)
# for code below, remove anything we aren't actually building
Message("${plot} removed from build because it does not exist")
LIST(REMOVE_ITEM BUILD_PLUGINS ${plot})
ENDIF()
ENDIF()
ENDFOREACH(plot)
# If we're building statically, make various main programs depend on plugins being built
# 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.
# Write a file containing the list of plugins such that we can include it
# into C++ code.
FOREACH(plot ${BUILD_PLUGINS})
SET(plotCode "${plotCode}PLUGIN_VERB(${plot})\n")
ENDFOREACH(plot)
......
......@@ -126,6 +126,7 @@ enhancements and bug-fixes that were added to this release.</p>
</li>
<li>Filters have been improved so they add some filter metadata that at least contains the name of the operator that was applied. Text representations of the operator attributes can also be added to the filter metadata. Filter metadata can be used during database export to make meaningful names for the visualizations being exported.</li>
<li>The database plugin API has been extended so that plugins can return license strings.</li>
<li>One can now specify which plugins VisIt should build via CMake variables VISIT_SELECTED_type_PLUGINS, where 'type' is one of: DATABASE, PLOT, OPERATOR. Setting the var can be accomplished in the config-site file via a SET command: <pre>SET(VISIT_SELECTED_DATABASE_PLUGINS Silo VTK H5Part)</pre> or via the cmake command line with a ';' separated list: <pre>-DVISIT_SELECTED_DATABASE_PLUGINS:STRING="Silo;VTK;H5Part"</pre>If this is var is not set for a particular plugin type, then plugins are built according to normal rules. <i>Spelling of the plugin must match its directory name.</i></li>
</ul>
<p>Click the following link to view the release notes for the previous version
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment