Skip to content

Commit a64d854

Browse files
committed
COMP: Update vtkMacroKitPythonWrap removing support for VTK < 8.2
1 parent 48a644d commit a64d854

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

CMake/vtkMacroKitPythonWrap.cmake

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ macro(vtkMacroKitPythonWrap)
118118
endif()
119119
# Default global variables
120120
if(NOT DEFINED Slicer_VTK_WRAP_HIERARCHY_DIR)
121-
# set(Slicer_VTK_WRAP_HIERARCHY_DIR ${Slicer_BINARY_DIR})
122121
set(Slicer_VTK_WRAP_HIERARCHY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
123122
endif()
124123
if(NOT DEFINED Slicer_VTK_WRAP_MODULE_INSTALL_COMPONENT_IDENTIFIER)
@@ -135,7 +134,6 @@ macro(vtkMacroKitPythonWrap)
135134
include(vtkWrapPython)
136135

137136
set(TMP_WRAP_FILES ${MY_KIT_SRCS} ${MY_KIT_WRAP_HEADERS})
138-
set(_wrap_hierarchy_stamp_file)
139137

140138
# Create list of wrapping dependencies for generating the hierarchy file.
141139
set(_kit_wrap_depends)
@@ -176,17 +174,13 @@ macro(vtkMacroKitPythonWrap)
176174
list(APPEND VTK_WRAP_INCLUDE_DIRS ${_kit_wrap_include_dirs})
177175

178176
# Generate hierarchy files for VTK8 and later
179-
if(NOT ${VTK_VERSION_MAJOR} VERSION_LESS 8)
180177
include(vtkWrapHierarchy)
181178

182179
# Set variables for this and future runs of vtk_wrap_hierarchy:
183180
# - <module_name>_WRAP_DEPENDS
184181
# - <module_name>_WRAP_HIERARCHY_FILE
185182
set(${MY_KIT_NAME}_WRAP_DEPENDS "${_kit_wrap_depends}" CACHE INTERNAL "${MY_KIT_NAME} wrapping dependencies" FORCE)
186183
set(_wrap_hierarchy_file "${Slicer_VTK_WRAP_HIERARCHY_DIR}/${MY_KIT_NAME}Hierarchy.txt")
187-
if(${VTK_VERSION_MAJOR}.${VTK_VERSION_MINOR} VERSION_LESS "8.2")
188-
set(_wrap_hierarchy_stamp_file ${CMAKE_CURRENT_BINARY_DIR}/${MY_KIT_NAME}Hierarchy.stamp.txt)
189-
endif()
190184
set(${MY_KIT_NAME}_WRAP_HIERARCHY_FILE "${_wrap_hierarchy_file}" CACHE INTERNAL "${MY_KIT_NAME} wrap hierarchy file" FORCE)
191185

192186
set_property(GLOBAL APPEND PROPERTY ${Slicer_VTK_WRAP_HIERARCHY_TARGETS_PROPERTY_NAME} ${MY_KIT_NAME})
@@ -197,7 +191,6 @@ macro(vtkMacroKitPythonWrap)
197191

198192
# Generate hierarchy files
199193
vtk_wrap_hierarchy(${MY_KIT_NAME} ${Slicer_VTK_WRAP_HIERARCHY_DIR} "${TMP_WRAP_FILES}")
200-
endif()
201194

202195
VTK_WRAP_PYTHON3(${MY_KIT_NAME}Python KitPython_SRCS "${TMP_WRAP_FILES}")
203196

@@ -211,11 +204,7 @@ macro(vtkMacroKitPythonWrap)
211204
# hierarchy file is created.
212205
# XXX Use target_sources if cmake_minimum_required >= 3.1
213206
get_target_property(_kit_srcs ${MY_KIT_NAME} SOURCES)
214-
if(${VTK_VERSION_MAJOR}.${VTK_VERSION_MINOR} VERSION_LESS "8.2")
215-
list(APPEND _kit_srcs ${_wrap_hierarchy_stamp_file})
216-
else()
217-
list(APPEND _kit_srcs ${_wrap_hierarchy_file})
218-
endif()
207+
list(APPEND _kit_srcs ${_wrap_hierarchy_file})
219208
set_target_properties(${MY_KIT_NAME} PROPERTIES SOURCES "${_kit_srcs}")
220209

221210
set(VTK_KIT_PYTHON_LIBRARIES)

0 commit comments

Comments
 (0)