Skip to content
Snippets Groups Projects
Commit c47ffa1e authored by David Gobbi's avatar David Gobbi
Browse files

Skip vtkDataObjectImplicitBackendInstantiateIdType

Since vtkIdType is just a typedef for one of the fundamental
types for which the template is already instantiated, we must
avoid instantiating for vtkIdType since the instantiation will
result in duplicate template symbols.  Most linkers will handle
the duplicated template symbols, but some linkers will generate
an error.
parent 35fb2ed4
No related branches found
No related tags found
No related merge requests found
......@@ -315,9 +315,12 @@ set(private_templates
include(vtkTypeLists)
set(instantiation_sources)
foreach (_type IN LISTS vtk_numeric_types)
set(INSTANTIATION_VALUE_TYPE "${_type}")
vtk_type_to_camel_case("${_type}" _cased_type)
foreach (INSTANTIATION_VALUE_TYPE IN LISTS vtk_numeric_types)
# only instantiate fundamental types, not typedefs
if (INSTANTIATION_VALUE_TYPE STREQUAL "vtkIdType")
continue()
endif ()
vtk_type_to_camel_case("${INSTANTIATION_VALUE_TYPE}" _cased_type)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/vtkDataObjectImplicitBackendInstantiate.cxx.in"
"${CMAKE_CURRENT_BINARY_DIR}/vtkDataObjectImplicitBackendInstantiate${_cased_type}.cxx")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment