Commit d5a2da08 authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot
Browse files

Merge topic 'remove-wrap-exclude-python'

f7a4e5c7 tests: set diffuse lighting to 0
b14baca1 cmake: remove WRAP_EXCLUDE_PYTHON
b42027e1 VTK: bump for wrap exclude property removal support
fd3ef7da ClientServer: always use the basename for the dummy function name
fe4e12c5 ClientServer: skip wrapping template methods
d417804b

 wrapping: hide internal classes from wrappers
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <utkarsh.ayachit@kitware.com>
Acked-by: David Gobbi's avatarDavid Gobbi <david.gobbi@gmail.com>
Merge-request: !2087
parents c9af1eec f7a4e5c7
Pipeline #84990 failed with stage
in 0 seconds
......@@ -82,4 +82,7 @@
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/SearchBox/SearchLineEdit" command="set_string" arguments="ambient" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/Ambient/DoubleRangeWidget/LineEdit" command="set_string" arguments="1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/Ambient/DoubleRangeWidget/LineEdit" command="key" arguments="16777221" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/SearchBox/SearchLineEdit" command="set_string" arguments="diffuse" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/Diffuse/DoubleRangeWidget/LineEdit" command="set_string" arguments="0" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/Diffuse/DoubleRangeWidget/LineEdit" command="key" arguments="16777221" />
</pqevents>
......@@ -184,6 +184,9 @@
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/SearchBox/SearchLineEdit" command="set_string" arguments="ambient" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/Ambient/DoubleRangeWidget/LineEdit" command="set_string" arguments="1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/Ambient/DoubleRangeWidget/LineEdit" command="key" arguments="16777221" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/SearchBox/SearchLineEdit" command="set_string" arguments="diffuse" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/Diffuse/DoubleRangeWidget/LineEdit" command="set_string" arguments="0" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/Diffuse/DoubleRangeWidget/LineEdit" command="key" arguments="16777221" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/Slice.png" width="300" height="300" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Delete" command="activate" arguments="" />
......
......@@ -76,14 +76,12 @@ macro(pv_pre_wrap_vtk_mod_cs libname module)
vtk_module_headers_load(${module})
foreach(class ${${module}_HEADERS})
if(NOT ${module}_HEADER_${class}_WRAP_EXCLUDE)
pv_find_vtk_header(${class}.h "${${module}_INCLUDE_DIRS}" pathfound)
if(pathfound)
list(APPEND ${module}CS_HEADERS ${pathfound})
else()
message(WARNING "Unable to find: ${class}")
endif()
pv_find_vtk_header(${class}.h "${${module}_INCLUDE_DIRS}" pathfound)
if(pathfound)
list(APPEND ${module}CS_HEADERS ${pathfound})
else()
message(WARNING "Unable to find: ${class}")
endif()
endforeach()
......@@ -158,9 +156,7 @@ MACRO(PV_PRE_WRAP_VTK_CS libname kit ukit deps)
# handle full paths
SET(full_name "${class}.h")
ENDIF()
IF(NOT VTK_CLASS_WRAP_EXCLUDE_${class})
SET(vtk${kit}CS_HEADERS ${vtk${kit}CS_HEADERS} ${full_name})
ENDIF()
SET(vtk${kit}CS_HEADERS ${vtk${kit}CS_HEADERS} ${full_name})
ENDFOREACH()
VTK_WRAP_ClientServer("${libname}" "vtk${kit}CS_SRCS" "${vtk${kit}CS_HEADERS}")
ENDMACRO()
......
......@@ -57,13 +57,9 @@ macro(VTK_WRAP_ClientServer TARGET SRC_LIST_NAME SOURCES)
# For each class
foreach(FILE ${SOURCES})
# should we wrap the file?
get_source_file_property(TMP_WRAP_EXCLUDE_PYTHON ${FILE} WRAP_EXCLUDE_PYTHON)
# if we should wrap it
if (NOT TMP_WRAP_EXCLUDE_PYTHON AND
(NOT PARAVIEW_USE_UNIFIED_BINDINGS OR
NO_PYTHON_BINDINGS_AVAILABLE))
if (NOT PARAVIEW_USE_UNIFIED_BINDINGS OR
NO_PYTHON_BINDINGS_AVAILABLE)
# what is the filename without the extension
get_filename_component(TMP_FILENAME ${FILE} NAME_WE)
......@@ -119,7 +115,7 @@ macro(VTK_WRAP_ClientServer TARGET SRC_LIST_NAME SOURCES)
${CMAKE_CURRENT_BINARY_DIR}/${TARGET}Init.cxx)
set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/${TARGET}Init.cxx
PROPERTIES GENERATED 1 WRAP_EXCLUDE_PYTHON 1
PROPERTIES GENERATED 1
)
unset(NO_PYTHON_BINDINGS_AVAILABLE)
......
......@@ -9,5 +9,4 @@ foreach (file vtkIceTCompositeZPassShader_fs.glsl)
HEADER_OUTPUT header
SOURCE_OUTPUT source)
list(APPEND Module_SRCS ${source})
set_source_files_properties(${header} ${source} PROPERTIES WRAP_EXCLUDE_PYTHON 1)
endforeach()
......@@ -18,12 +18,6 @@ foreach(file ${shader_files})
HEADER_OUTPUT header
SOURCE_OUTPUT source)
list(APPEND Module_SRCS ${source})
set_source_files_properties(
${source}
${header}
PROPERTIES
WRAP_EXCLUDE_PYTHON 1
)
endforeach()
add_definitions(-DVTK_OPENGL2)
......
......@@ -65,11 +65,6 @@ if (CMAKE_Fortran_COMPILER_WORKS)
${${vtk-module}_HDRS}
FortranAdaptorAPI.h
${CMAKE_CURRENT_BINARY_DIR}/FortranAdaptorAPIMangling.h)
set_source_files_properties(
FortranAdaptorAPI
PROPERTIES
WRAP_EXCLUDE_PYTHON 1)
endif()
if (PARAVIEW_USE_MPI)
......
......@@ -50,7 +50,6 @@ if (APPLE)
set_source_files_properties(
vtkPVMacFileInformationHelper
PROPERTIES
WRAP_EXCLUDE_PYTHON 1
SKIP_HEADER_INSTALL 1
)
endif()
......
......@@ -131,15 +131,6 @@ if(NOT VTK_LEGACY_REMOVE)
vtkPVOpenGLExtensionsInformation.cxx)
endif()
set_source_files_properties(
vtkCacheSizeKeeper
# No need to wrap vtkPExtentTranslator, its an internal class.
vtkPExtentTranslator
PROPERTIES
WRAP_EXCLUDE_PYTHON 1
)
set (${vtk-module}_HDRS vtkStreamingPriorityQueue.h)
vtk_module_library(vtkPVClientServerCoreRendering ${Module_SRCS})
......
......@@ -64,11 +64,6 @@ set (Module_SRCS
vtkSMMessage.cxx
)
set_source_files_properties(
vtkSMMessage
PROPERTIES
WRAP_EXCLUDE_PYTHON 1)
# Add header-only files so they get installed correctly.
set (${vtk-module}_HDRS
${CMAKE_CURRENT_SOURCE_DIR}/vtkSMMessageMinimal.h
......
......@@ -25,7 +25,6 @@ set_source_files_properties(
vtkCGNSReaderInternal
vtkFileSeriesHelper
PROPERTIES
WRAP_EXCLUDE_PYTHON 1
SKIP_HEADER_INSTALL 1
)
......
......@@ -41,9 +41,6 @@ set(Module_SRCS
vtk_module_export_code_find_package(GenericIO)
set_source_files_properties(
vtkGenericIOUtilities
PROPERTIES WRAP_EXCLUDE_PYTHON 1)
vtk_module_library(vtkPVVTKExtensionsCosmoTools ${Module_SRCS})
vtk_module_link_libraries(vtkPVVTKExtensionsCosmoTools
LINK_PRIVATE
......
......@@ -147,11 +147,6 @@ set (${vtk-module}_HDRS
vtkMaterialInterfaceIdListItem.h
)
set_source_files_properties(
vtkSpyPlotBlockIterator
PROPERTIES WRAP_EXCLUDE_PYTHON 1
)
vtk_module_library(vtkPVVTKExtensionsDefault ${Module_SRCS})
target_link_libraries(vtkPVVTKExtensionsDefault LINK_PRIVATE
${vtkIOInfovis_LIBRARIES})
......
#ifndef vtkSpyPlotBlockIterator_h
#define vtkSpyPlotBlockIterator_h
#ifndef __VTK_WRAP__
#include "assert.h"
#include "vtkPVVTKExtensionsDefaultModule.h" //needed for exports
......@@ -174,6 +175,7 @@ inline int vtkSpyPlotBlockIterator::GetNumberOfFields() const
return this->NumberOfFields;
}
#endif
#endif
// VTK-HeaderTest-Exclude: vtkSpyPlotBlockIterator.h
......@@ -35,7 +35,6 @@ endif()
set_source_files_properties(
${Module_SRCS}
PROPERTIES
WRAP_EXCLUDE_PYTHON 1
SKIP_HEADER_INSTALL 1)
SET_SOURCE_FILES_PROPERTIES(
......
......@@ -134,7 +134,6 @@ foreach (file vtkIceTCompositeZPassShader_fs.glsl)
HEADER_OUTPUT header
SOURCE_OUTPUT source)
list(APPEND Module_SRCS ${source})
set_source_files_properties(${header} ${source} PROPERTIES WRAP_EXCLUDE_PYTHON 1)
endforeach()
#---------------------------------------------------------
......
......@@ -572,7 +572,7 @@ typedef struct _NewClassInfo
int notWrappable(FunctionInfo* curFunction)
{
return (curFunction->IsOperator || curFunction->ArrayFailure || !curFunction->IsPublic ||
!curFunction->Name);
!curFunction->Name || curFunction->Template);
}
//--------------------------------------------------------------------------nix
......@@ -1107,14 +1107,18 @@ int extractOtherClassesUsed(NewClassInfo* data, const char* classes[])
* @param fp file to write into
* @param data data which will be used to write into file
*/
void output_DummyInitFunction(FILE* fp, const char* name)
void output_DummyInitFunction(FILE* fp, const char* filename)
{
char* basename = strrchr(filename, '/');
char* basename_dup = strdup(basename + 1);
*strchr(basename_dup, '.') = '\0';
fprintf(fp, "#include \"vtkSystemIncludes.h\"\n"
"#include \"vtkClientServerInterpreter.h\"\n"
"void VTK_EXPORT %s_Init(vtkClientServerInterpreter* /*csi*/)\n"
"{\n"
"}\n",
name);
basename_dup);
free(basename_dup);
}
//--------------------------------------------------------------------------nix
......@@ -1265,18 +1269,14 @@ int main(int argc, char* argv[])
if (!data)
{
char* basename = strrchr(fileInfo->FileName, '/');
char* basename_dup = strdup(basename);
*strchr(basename_dup, '.') = '\0';
output_DummyInitFunction(fp, basename_dup + 1);
free(basename_dup);
output_DummyInitFunction(fp, fileInfo->FileName);
fclose(fp);
exit(0);
}
if (data->Template)
{
output_DummyInitFunction(fp, data->Name);
output_DummyInitFunction(fp, fileInfo->FileName);
fclose(fp);
exit(0);
}
......@@ -1285,7 +1285,7 @@ int main(int argc, char* argv[])
{
if (strchr(data->SuperClasses[i], '<'))
{
output_DummyInitFunction(fp, data->Name);
output_DummyInitFunction(fp, fileInfo->FileName);
fclose(fp);
exit(0);
}
......@@ -1309,7 +1309,7 @@ int main(int argc, char* argv[])
{
if (!vtkWrap_IsTypeOf(hierarchyInfo, data->Name, "vtkObjectBase"))
{
output_DummyInitFunction(fp, data->Name);
output_DummyInitFunction(fp, fileInfo->FileName);
fclose(fp);
exit(0);
}
......
Subproject commit b1da0529e90969873bf185ab452273e0dfed789a
Subproject commit 52e28677d6dc9972c564c2214e4b7412e1eead75
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