Commit df2aad38 authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot

Merge topic 'clean-up-pvconfig'

47aee35b vtkCDIReader: forward declare vtkMultiProcessController if necessary
213c11ec Documentation: add release note
5e662b55 MinimalBuildTools: remove old code
aea4206d vtkPVConfig: remove PARAVIEW_FREEZE_PYTHON
fa1edda5 vtkPVConfig: remove PARAVIEW_ENABLE_PYTHON
2bf36985 vtkPVConfig: remove PARAVIEW_USE_MPI
60ecfb44 vtkPVConfig: remove PARAVIEW_USE_ICE_T
e98490b3 pqDoubleSliderWidget: move precision to the source file
...
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !2989
parents 21a0bb18 47aee35b
Pipeline #138923 running with stage
......@@ -79,8 +79,12 @@ if (PARAVIEW_ENABLE_EMBEDDED_DOCUMENTATION)
endif ()
if (PARAVIEW_ENABLE_PYTHON)
target_compile_definitions(paraview
PRIVATE
PARAVIEW_ENABLE_PYTHON)
target_link_libraries(paraview
PRIVATE
ParaView::pvpythonmodules
ParaView::pqPython
ParaView::PythonInitializer)
endif ()
......
......@@ -30,11 +30,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
========================================================================*/
#include "vtkPVConfig.h"
#ifdef PARAVIEW_ENABLE_PYTHON
extern "C" {
void vtkPVInitializePythonModules();
}
#endif
#include "ParaViewMainWindow.h"
#include "ui_ParaViewMainWindow.h"
......@@ -58,8 +53,8 @@ void vtkPVInitializePythonModules();
#include "vtkSMSettings.h"
#include "vtksys/SystemTools.hxx"
#ifndef BUILD_SHARED_LIBS
#include "pvStaticPluginsInit.h"
#ifdef PARAVIEW_ENABLE_PYTHON
#include "pvpythonmodules.h"
#endif
#ifdef PARAVIEW_USE_QTHELP
......@@ -116,7 +111,7 @@ ParaViewMainWindow::ParaViewMainWindow()
}
#ifdef PARAVIEW_ENABLE_PYTHON
vtkPVInitializePythonModules();
pvpythonmodules_load();
#endif
#ifdef PARAVIEW_ENABLE_EMBEDDED_DOCUMENTATION
......@@ -382,7 +377,7 @@ void ParaViewMainWindow::updateFontSize()
}
// Console font size
#if defined(PARAVIEW_ENABLE_PYTHON)
#ifdef PARAVIEW_ENABLE_PYTHON
pqPythonShell* shell = qobject_cast<pqPythonShell*>(this->Internals->pythonShellDock->widget());
shell->setFontSize(fontSize);
#endif
......
......@@ -281,6 +281,11 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n")
PROPERTY
Qt5Core_VERSION_MINOR "${Qt5Core_VERSION_MAJOR}")
set(_paraview_client_built_shared 0)
if (BUILD_SHARED_LIBS)
set(_paraview_client_built_shared 1)
endif ()
set(_paraview_client_source_files
"${CMAKE_CURRENT_BINARY_DIR}/${_paraview_client_NAME}_main.cxx"
"${CMAKE_CURRENT_BINARY_DIR}/pq${_paraview_client_NAME}Initializer.cxx"
......
......@@ -907,6 +907,13 @@ function (paraview_add_plugin name)
get_property(_paraview_add_plugin_description GLOBAL
PROPERTY "_paraview_plugin_${_paraview_build_plugin}_description")
set(_paraview_build_plugin_type MODULE)
set(_paraview_add_plugin_built_shared 1)
if (NOT BUILD_SHARED_LIBS OR _paraview_add_plugin_FORCE_STATIC)
set(_paraview_build_plugin_type STATIC)
set(_paraview_add_plugin_built_shared 0)
endif ()
configure_file(
"${_paraview_plugin_source_dir}/paraview_plugin.h.in"
"${_paraview_add_plugin_header}")
......@@ -924,11 +931,6 @@ function (paraview_add_plugin name)
endif ()
string(APPEND CMAKE_LIBRARY_OUTPUT_DIRECTORY "/${_paraview_build_plugin}")
set(_paraview_build_plugin_type MODULE)
if (NOT BUILD_SHARED_LIBS OR _paraview_add_plugin_FORCE_STATIC)
set(_paraview_build_plugin_type STATIC)
endif ()
add_library("${_paraview_build_plugin}" "${_paraview_build_plugin_type}"
${_paraview_add_plugin_header}
${_paraview_add_plugin_source}
......
......@@ -55,6 +55,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#cmakedefine01 _paraview_client_APPLICATION_XMLS
#cmakedefine01 _paraview_client_SPLASH_IMAGE
#cmakedefine01 _paraview_client_TITLE
#cmakedefine01 _paraview_client_built_shared
//-----------------------------------------------------------------------------
pq@_paraview_client_NAME@Initializer::pq@_paraview_client_NAME@Initializer()
......@@ -97,7 +98,7 @@ pq@_paraview_client_NAME@Initializer::Status pq@_paraview_client_NAME@Initialize
return ExitSuccess;
}
#ifndef BUILD_SHARED_LIBS
#if !_paraview_client_built_shared
@_paraview_client_resource_init@
#endif
......
......@@ -3,7 +3,6 @@
#include "vtkObjectFactory.h"
#include "vtkPVPluginLoader.h"
#cmakedefine BUILD_SHARED_LIBS
#cmakedefine01 _paraview_add_plugin_EULA
#cmakedefine01 _paraview_add_plugin_SERVER_MANAGER_XML
#cmakedefine01 _paraview_add_plugin_MODULES
......@@ -131,11 +130,11 @@ void @_paraview_build_plugin@Plugin::GetPythonSourceList(std::vector<std::string
//-----------------------------------------------------------------------------
@_paraview_build_plugin@Plugin::@_paraview_build_plugin@Plugin()
{
#if !defined(BUILD_SHARED_LIBS) && _paraview_add_plugin_with_resources
#if !_paraview_add_plugin_built_shared && _paraview_add_plugin_with_resources
// For static builds, initialize the Qt resources.
@_paraview_add_plugin_resources_init@
#endif
#if !defined(BUILD_SHARED_LIBS) && _paraview_add_plugin_with_ui
#if !_paraview_add_plugin_built_shared && _paraview_add_plugin_with_ui
// For static builds, initialize the Qt plugin.
Q_IMPORT_PLUGIN(@_paraview_build_plugin@Plugin)
#endif
......
#cmakedefine01 _paraview_add_plugin_built_shared
#cmakedefine01 _paraview_add_plugin_with_python
#cmakedefine01 _paraview_add_plugin_with_ui
#cmakedefine01 _paraview_add_plugin_with_xml
#define PARAVIEW_BUILDING_PLUGIN
#define PARAVIEW_PLUGIN_BUILT_SHARED _paraview_add_plugin_built_shared
#include "vtkPVPlugin.h"
#if _paraview_add_plugin_with_ui
......
......@@ -189,7 +189,7 @@ endif ()
# Add ability to freeze Python modules.
cmake_dependent_option(PARAVIEW_FREEZE_PYTHON
"Freeze Python packages/modules into the application." OFF
# XXX(python): Freezing is not yet supported.
# FIXME(python): Freezing is not yet supported.
"PARAVIEW_ENABLE_PYTHON;NOT WIN32;NOT APPLE;FALSE" OFF)
mark_as_advanced(PARAVIEW_FREEZE_PYTHON)
cmake_dependent_option(PARAVIEW_ENABLE_WEB "Enable/Disable web support" "${paraview_web_default}"
......
......@@ -18,7 +18,7 @@
#include "vtkPVCustomTestDriver.h"
#include "vtkPVConfig.h"
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
#include "vtkMPI.h"
#endif
#include <iostream>
......@@ -30,7 +30,7 @@ int main(int argc, char* argv[])
cerr << "Wrong number of arguments. Command is: <exe> <python script>\n";
return 1;
}
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
MPI_Init(&argc, &argv);
#endif
int errors = 0;
......@@ -53,7 +53,7 @@ int main(int argc, char* argv[])
}
testDriver->Delete();
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
MPI_Finalize();
#endif
......
......@@ -60,6 +60,7 @@ if (PARAVIEW_ENABLE_PYTHON)
paraview_add_executable("${exe}" "${exe}.cxx")
target_link_libraries("${exe}"
PRIVATE
ParaView::pvpythonmodules
VTK::PythonInterpreter)
list(APPEND paraview_tools
"${exe}")
......
......@@ -19,13 +19,14 @@ function (paraview_add_executable name)
PRIVATE
ParaView::ServerManagerApplication)
if (NOT BUILD_SHARED_LIBS)
target_link_libraries("${name}"
PRIVATE
paraview_plugins_static)
endif ()
target_link_libraries("${name}"
PRIVATE
paraview_plugins)
if (PARAVIEW_ENABLE_PYTHON)
target_compile_definitions("${name}"
PRIVATE
PARAVIEW_ENABLE_PYTHON)
target_link_libraries("${name}"
PRIVATE
ParaView::pvpythonmodules
......
......@@ -14,12 +14,6 @@ PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkPVConfig.h"
#ifdef PARAVIEW_ENABLE_PYTHON
extern "C" {
void vtkPVInitializePythonModules();
}
#endif
#include "vtkInitializationHelper.h"
#include "vtkMultiProcessController.h"
#include "vtkNetworkAccessManager.h"
......@@ -27,10 +21,12 @@ void vtkPVInitializePythonModules();
#include "vtkPVSessionServer.h"
#include "vtkProcessModule.h"
#ifndef BUILD_SHARED_LIBS
#include "paraview_plugins_static.h"
#ifdef PARAVIEW_ENABLE_PYTHON
#include "pvpythonmodules.h"
#endif
#include "paraview_plugins.h"
static bool RealMain(int argc, char* argv[], vtkProcessModule::ProcessTypes type)
{
// Marking this static avoids the false leak messages from vtkDebugLeaks when
......@@ -51,13 +47,11 @@ static bool RealMain(int argc, char* argv[], vtkProcessModule::ProcessTypes type
#ifdef PARAVIEW_ENABLE_PYTHON
// register callback to initialize modules statically. The callback is
// empty when BUILD_SHARED_LIBS is ON.
vtkPVInitializePythonModules();
pvpythonmodules_load();
#endif
#ifndef BUILD_SHARED_LIBS
// load static plugins
paraview_plugins_static_init();
#endif
paraview_plugins_initialize();
vtkProcessModule* pm = vtkProcessModule::GetProcessModule();
vtkMultiProcessController* controller = pm->GetGlobalController();
......
# pvconfig-cleanup
* The `vtkPVConfig.h` header no longer provides feature details like whether
MPI, Python, or various VisIt readers are enabled. Instead, CMake logic
should be used to detect whether the metafeatures are enabled (VisIt readers
are not exposed currently).
......@@ -79,6 +79,17 @@ set(classes
vtkSessionIterator
vtkTCPNetworkAccessManager)
set(built_shared 0)
if (BUILD_SHARED_LIBS)
set(built_shared 1)
endif ()
set_property(SOURCE
vtkPVPluginLoader.cxx
vtkPVPluginTracker.cxx
APPEND
PROPERTY
COMPILE_DEFINITIONS "BUILD_SHARED_LIBS=${built_shared}")
if (TARGET VTK::PythonInterpreter)
# TODO: Split these into a separate module so that there isn't a public
# optional dependency.
......
......@@ -33,7 +33,7 @@
#include "vtkObject.h"
#include "vtkPVClientServerCoreCoreModule.h" //needed for exports
#include "vtkPVConfig.h" // needed for PARAVIEW_VERSION and CMAKE_CXX_COMPILER_ID
#include "vtkPVConfig.h" // needed for PARAVIEW_VERSION
#include <string>
#include <vector>
......@@ -157,12 +157,10 @@ private:
//@}
#ifndef __WRAP__
typedef const char*(C_DECL* pv_plugin_query_verification_data_fptr)();
typedef vtkPVPlugin*(C_DECL* pv_plugin_query_instance_fptr)();
#endif
/// TODO: add compiler version.
#define _PV_PLUGIN_VERIFICATION_STRING "paraviewplugin|" CMAKE_CXX_COMPILER_ID "|" PARAVIEW_VERSION
#ifdef PARAVIEW_BUILDING_PLUGIN
// vtkPVPluginLoader checks for existence of this function
// to determine if the shared-library is a paraview-server-manager plugin or
......@@ -170,18 +168,14 @@ typedef vtkPVPlugin*(C_DECL* pv_plugin_query_instance_fptr)();
// etc. These global functions are added only for shared builds. In static
// builds, plugins cannot be loaded at runtime (only at compile time) so
// verification is not necessary.
#ifdef BUILD_SHARED_LIBS
#if PARAVIEW_PLUGIN_BUILT_SHARED
#define _PV_PLUGIN_GLOBAL_FUNCTIONS(PLUGIN) \
C_EXPORT const char* C_DECL pv_plugin_query_verification_data() \
{ \
return _PV_PLUGIN_VERIFICATION_STRING; \
} \
C_EXPORT vtkPVPlugin* C_DECL pv_plugin_instance() { return pv_plugin_instance_##PLUGIN(); }
#else // BUILD_SHARED_LIBS
#else
// define empty export. When building static, we don't want to define the global
// functions.
#define _PV_PLUGIN_GLOBAL_FUNCTIONS(PLUGIN)
#endif // BUILD_SHARED_LIBS
#endif
// vtkPVPluginLoader uses this function to obtain the vtkPVPlugin instance for
// this plugin. In a plugin, there can only be one call to this macro. When
......@@ -206,5 +200,7 @@ typedef vtkPVPlugin*(C_DECL* pv_plugin_query_instance_fptr)();
#define PV_PLUGIN_IMPORT(PLUGIN) vtkPVPlugin::ImportPlugin(pv_plugin_instance_##PLUGIN());
#endif
#endif // vtkPVPlugin_h
// VTK-HeaderTest-Exclude: vtkPVPlugin.h
......@@ -291,7 +291,7 @@ vtkPVPluginLoader::~vtkPVPluginLoader()
//-----------------------------------------------------------------------------
void vtkPVPluginLoader::LoadPluginsFromPluginSearchPath()
{
#ifdef BUILD_SHARED_LIBS
#if BUILD_SHARED_LIBS
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "Loading Plugins from standard PLUGIN_PATHS\n%s",
(this->SearchPaths ? this->SearchPaths : "(nullptr)"));
......@@ -314,7 +314,7 @@ void vtkPVPluginLoader::LoadPluginsFromPluginSearchPath()
//-----------------------------------------------------------------------------
void vtkPVPluginLoader::LoadPluginsFromPluginConfigFile()
{
#ifdef BUILD_SHARED_LIBS
#if BUILD_SHARED_LIBS
const char* configFiles = vtksys::SystemTools::GetEnv("PV_PLUGIN_CONFIG_FILE");
if (configFiles != NULL)
{
......@@ -399,7 +399,7 @@ bool vtkPVPluginLoader::LoadPluginInternal(const char* file, bool no_errors)
return false;
}
#ifndef BUILD_SHARED_LIBS
#if !BUILD_SHARED_LIBS
vtkPVPluginLoaderErrorMacro("Could not find the plugin statically linked in, and "
"cannot load dynamic plugins in static builds.");
return false;
......@@ -424,46 +424,8 @@ bool vtkPVPluginLoader::LoadPluginInternal(const char* file, bool no_errors)
"Loaded shared library successfully. Now trying to validate that it's a ParaView plugin.");
// A plugin shared library has two global functions:
// * pv_plugin_query_verification_data -- to obtain version
// * pv_plugin_instance -- to obtain the plugin instance.
pv_plugin_query_verification_data_fptr pv_plugin_query_verification_data =
(pv_plugin_query_verification_data_fptr)(
vtkDynamicLoader::GetSymbolAddress(lib, "pv_plugin_query_verification_data"));
if (!pv_plugin_query_verification_data)
{
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(),
"Failed to locate the global function "
"\"pv_plugin_query_verification_data\" which is required to test the "
"plugin signature. This may not be a ParaView plugin dll or maybe "
"from a older version of ParaView when this function was not required.");
vtkPVPluginLoaderErrorMacro(
"Not a ParaView Plugin since could not locate the plugin-verification function");
vtkDynamicLoader::CloseLibrary(lib);
return false;
}
std::string pv_verfication_data = pv_plugin_query_verification_data();
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "Plugin's signature: %s", pv_verfication_data.c_str());
// Validate the signature. If the signature is invalid, then this plugin is
// totally bogus (even for the GUI layer).
if (pv_verfication_data != _PV_PLUGIN_VERIFICATION_STRING)
{
std::ostringstream error;
error << "Mismatch in versions: \n"
<< "ParaView Signature: " << _PV_PLUGIN_VERIFICATION_STRING << "\n"
"Plugin Signature: "
<< pv_verfication_data;
vtkPVPluginLoaderErrorMacro(error.str().c_str());
vtkDynamicLoader::CloseLibrary(lib);
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(),
"Mismatch in versions signifies that the plugin was built for "
"a different version of ParaView or with a different compilter. "
"Look at the signatures to determine what caused the mismatch.");
return false;
}
// If we succeeded so far, then obtain the instance of vtkPVPlugin for this
// plugin and load it.
......@@ -482,11 +444,6 @@ bool vtkPVPluginLoader::LoadPluginInternal(const char* file, bool no_errors)
return false;
}
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(),
"Plugin signature verification successful. "
"This is definitely a ParaView plugin compiled with correct compiler for "
"correct ParaView version.");
// BUG # 0008673
// Tell the platform to look in the plugin's directory for
// its dependencies. This isn't the right thing to do. A better
......
......@@ -98,7 +98,7 @@ std::string vtkLocatePluginOrConfigFile(
return std::string();
}
#ifndef BUILD_SHARED_LIBS
#if !BUILD_SHARED_LIBS
bool debug_plugin = vtksys::SystemTools::GetEnv("PV_PLUGIN_DEBUG") != NULL;
if (isPlugin)
{
......@@ -121,7 +121,7 @@ std::string vtkLocatePluginOrConfigFile(
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "VTK libraries location is '%s'", vtklib.c_str());
std::vector<std::string> prefixes = {
#if defined(BUILD_SHARED_LIBS)
#if BUILD_SHARED_LIBS
std::string("paraview-" PARAVIEW_VERSION "/plugins/") + plugin,
std::string("paraview-" PARAVIEW_VERSION "/plugins/"),
#else
......
......@@ -16,43 +16,12 @@
#ifndef vtkPVConfig_h
#define vtkPVConfig_h
#cmakedefine PARAVIEW_USE_ICE_T
#cmakedefine PARAVIEW_USE_QTHELP
// defined when ParaView is built with MPI.
#cmakedefine PARAVIEW_USE_MPI
// flags controlling various visit-bridge components being built.
#cmakedefine VISIT_BUILD_READER_CGNS
#cmakedefine VISIT_BUILD_READER_GMV
#cmakedefine VISIT_BUILD_READER_Silo
#cmakedefine VISIT_BUILD_READER_Boxlib3D
#cmakedefine VISIT_BUILD_READER_Mili
#cmakedefine PARAVIEW_ENABLE_PYTHON
#cmakedefine PARAVIEW_FREEZE_PYTHON
#define PARAVIEW_VERSION_MAJOR @PARAVIEW_VERSION_MAJOR@
#define PARAVIEW_VERSION_MINOR @PARAVIEW_VERSION_MINOR@
#define PARAVIEW_VERSION_PATCH @PARAVIEW_VERSION_PATCH@
#define PARAVIEW_VERSION "@PARAVIEW_VERSION@"
#define PARAVIEW_VERSION_FULL "@PARAVIEW_VERSION_FULL@"
#define CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@"
#ifdef PARAVIEW_ENABLE_QT_SUPPORT
# define PARAVIEW_QT_VERSION @PARAVIEW_QT_VERSION@
#endif
#cmakedefine BUILD_SHARED_LIBS
#ifdef BUILD_SHARED_LIBS
// for sake of old code, we define the PARAVIEW_BUILD_SHARED_LIBS variable. This
// can be deprecated once the cleanup is complete.
# define PARAVIEW_BUILD_SHARED_LIBS
#endif
// The default prevision value for conversion for string to double
// and double to string
#define DEFAULT_DOUBLE_PRECISION_VALUE 16
#endif
......@@ -18,6 +18,19 @@ vtk_add_test_cxx(${vtk-modules}ServerFilterTests tests
TestSpyPlotTracers.cxx
TestPVAMRDualContour.cxx
)
if (PARAVIEW_USE_MPI)
set_property(SOURCE ParaViewCoreVTKExtensionsPrintSelf.cxx APPEND
PROPERTY
COMPILE_DEFINITIONS PARAVIEW_USE_MPI)
endif ()
if (PARAVIEW_USE_ICE_T)
set_property(SOURCE ParaViewCoreVTKExtensionsPrintSelf.cxx APPEND
PROPERTY
COMPILE_DEFINITIONS PARAVIEW_USE_ICE_T)
endif ()
vtk_test_cxx_executable(${vtk-modules}ServerFilterTests tests)
target_link_libraries(${vtk-modules}ServerFilterTests
vtkPVVTKExtensions
......
......@@ -13,6 +13,13 @@ vtk_module_add_module(CDIReader::vtkCDIReader
SOURCES ${sources}
PRIVATE_HEADERS ${private_headers})
if (TARGET VTK::ParallelMPI)
# FIXME: The API should not depend on this.
vtk_module_definitions(CDIReader::vtkCDIReader
PUBLIC
PARAVIEW_USE_MPI)
endif ()
vtk_module_definitions(CDIReader::vtkCDIReader
PRIVATE
# Please leave these definitions in here and do not change them. We use the
......
......@@ -8,3 +8,6 @@ DEPENDS
VTK::CommonExecutionModel
PRIVATE_DEPENDS
VTK::netcdf
OPTIONAL_DEPENDS
VTK::ParallelCore
VTK::ParallelMPI
......@@ -356,7 +356,8 @@ int ComparePointWithIndex(const void* a, const void* b)
}
vtkStandardNewMacro(vtkCDIReader);
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
#include "vtkDummyController.h"
#include "vtkMultiProcessController.h"
vtkCxxSetObjectMacro(vtkCDIReader, Controller, vtkMultiProcessController);
#endif
......@@ -399,7 +400,7 @@ vtkCDIReader::vtkCDIReader()
this->PointDataArraySelection->AddObserver(vtkCommand::ModifiedEvent, this->SelectionObserver);
this->DomainDataArraySelection->AddObserver(vtkCommand::ModifiedEvent, this->SelectionObserver);
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
this->Controller = nullptr;
this->SetController(vtkMultiProcessController::GetGlobalController());
if (!this->Controller)
......@@ -523,7 +524,7 @@ vtkCDIReader::~vtkCDIReader()
delete this->Internals;
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
this->SetController(nullptr);
#endif
......@@ -551,7 +552,7 @@ int vtkCDIReader::RequestInformation(
return 0;
}
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
if (this->Controller->GetNumberOfProcesses() > 1)
{
this->Decomposition = true;
......@@ -1754,7 +1755,7 @@ int vtkCDIReader::ConstructGridGeometry()
int* vertex_ids2 = new int[size2];
CHECK_NEW(this->VertexIds);
CHECK_NEW(vertex_ids2);
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
if (this->Decomposition)
{
if (this->Piece == 0)
......
......@@ -46,6 +46,10 @@
#include "vtkSmartPointer.h"
#include "vtkUnstructuredGridAlgorithm.h"
#ifdef PARAVIEW_USE_MPI
class vtkMultiProcessController;
#endif
class vtkCallbackCommand;
class vtkDoubleArray;
class vtkStringArray;
......
......@@ -196,6 +196,14 @@ set(classes
pqWelcomeDialog
pqYoungsMaterialPropertyWidget)
set(built_shared 0)
if (BUILD_SHARED_LIBS)
set(built_shared 1)
endif ()
set_property(SOURCE pqApplicationComponentsInit.cxx APPEND
PROPERTY
COMPILE_DEFINITIONS "BUILD_SHARED_LIBS=${built_shared}")
set(headers
pqCatalystContinueReaction.h)
......
......@@ -32,18 +32,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqApplicationComponentsInit.h"
#include "pqComponentsInit.h"
#include "vtkPVConfig.h"
#include <QObject> // for Q_INIT_RESOURCE
#include <QtPlugin>
void pqApplicationComponentsInit()
{
#ifndef PARAVIEW_BUILD_SHARED_LIBS
#if !BUILD_SHARED_LIBS
// init dependents
pqComponentsInit();
// init resources
Q_INIT_RESOURCE(pqApplicationComponents);
#endif
}
......@@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "vtkPVConfig.h"
#include "pqCoreUtilities.h"
#if VTK_MODULE_ENABLE_VTK_PythonInterpreter
#if VTK_MODULE_ENABLE_ParaView_pqPython
#include "pqCatalystExportStateWizard.h"
#endif
#include <iostream>
......@@ -52,7 +52,7 @@ pqCatalystScriptGeneratorReaction::~pqCatalystScriptGeneratorReaction()
//-----------------------------------------------------------------------------
void pqCatalystScriptGeneratorReaction::onTriggered()
{
#if VTK_MODULE_ENABLE_VTK_PythonInterpreter
#if VTK_MODULE_ENABLE_ParaView_pqPython
pqCatalystExportStateWizard wizard(pqCoreUtilities::mainWidget());
wizard.customize();
wizard.exec();
......
......@@ -176,6 +176,14 @@ set(classes
pqViewManager
pqWidgetRangeDomain)
set(built_shared 0)
if (BUILD_SHARED_LIBS)
set(built_shared 1)
endif ()
set_property(SOURCE pqComponentsInit.cxx APPEND
PROPERTY
COMPILE_DEFINITIONS "BUILD_SHARED_LIBS=${built_shared}")
set(headers
pqPluginTreeWidget.h)
......@@ -244,7 +252,7 @@ set(sources)
set(private_headers
pqSGExportStateWizardInternals.h)
if (TARGET pqPython)
if (TARGET ParaView::pqPython)
# code for generating specialized Python scripts
# from the GUI using trace information
list(APPEND classes
......
......@@ -32,17 +32,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqComponentsInit.h"
#include "pqCoreInit.h"
#include "vtkPVConfig.h"
#include <QObject> // for Q_INIT_RESOURCE
void pqComponentsInit()
{
#ifndef PARAVIEW_BUILD_SHARED_LIBS
#if !BUILD_SHARED_LIBS
// init dependents
pqCoreInit();
// init resources
Q_INIT_RESOURCE(pqComponents);
#endif
}
......@@ -125,6 +125,17 @@ if (NOT VTK_LEGACY_REMOVE)
pqDebug)
endif()
set(built_shared 0)
if (BUILD_SHARED_LIBS)
set(built_shared 1)
endif ()
set_property(SOURCE pqCoreInit.cxx APPEND
PROPERTY
COMPILE_DEFINITIONS "BUILD_SHARED_LIBS=${built_shared}")
set_property(SOURCE pqCoreTestUtility.cxx APPEND
PROPERTY
COMPILE_DEFINITIONS "PARAVIEW_DATA_ROOT=\"${PARAVIEW_DATA_ROOT}\"")
set(ui_files
Resources/UI/pqFileDialog.ui
Resources/UI/pqOutputWidget.ui
......
......@@ -31,13 +31,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
========================================================================*/
#include "pqCoreInit.h"
#include "vtkPVConfig.h"
#include <QObject>
#include <QtPlugin>
void pqCoreInit()
{
#ifndef BUILD_SHARED_LIBS
#if !BUILD_SHARED_LIBS
Q_INIT_RESOURCE(pqCore);
Q_INIT_RESOURCE(QtWidgets);
#endif
......
......@@ -14,13 +14,13 @@
=========================================================================*/
#include "pqDoubleSliderWidget.h"
#include "vtkPVConfig.h"
// Qt includes
#include <QDoubleValidator>
#include <QHBoxLayout>
#include <QSlider>
#define DEFAULT_DOUBLE_PRECISION_VALUE 16
pqDoubleSliderWidget::pqDoubleSliderWidget(QWidget* parent)
: QWidget(parent)
{
......