Commit de1850fe authored by jcfr's avatar jcfr

COMP: Update VTK to include version change from 9.0 to 8.2. Fixes #4623

See https://issues.slicer.org/view.php?id=4623

List of changes:

$ git shortlog efdb5a2ba9..edb9030dc4 --no-merges
Jean-Christophe Fillion-Robin (2):
      Revert "Revert "set new deprecations to masters new name""
      Revert "Revert "reduce VTK's version number""

git-svn-id: http://svn.slicer.org/Slicer4/trunk@27473 3bd1e089-480b-0410-8dfb-8563597acbee
parent 4aba9eba
......@@ -124,7 +124,7 @@ if(APPLE)
endif()
endif()
if(DEFINED Slicer_SOURCE_DIR AND ("${Slicer_VTK_VERSION_MAJOR}" MATCHES "^(8|9)$" OR DEFINED Qt5_DIR))
if(DEFINED Slicer_SOURCE_DIR AND ("${Slicer_VTK_VERSION_MAJOR}" STREQUAL "8" OR DEFINED Qt5_DIR))
# Require minimum deployment target of 10.9. In 10.9 libc++ replaces libstdc++
# as the default runtime. Requiring this minimum ensures that all libraries
# use libc++.
......
......@@ -183,7 +183,7 @@ macro(vtkMacroKitPythonWrap)
# - <module_name>_WRAP_HIERARCHY_FILE
set(${MY_KIT_NAME}_WRAP_DEPENDS "${_kit_wrap_depends}" CACHE INTERNAL "${MY_KIT_NAME} wrapping dependencies" FORCE)
set(_wrap_hierarchy_file "${Slicer_VTK_WRAP_HIERARCHY_DIR}/${MY_KIT_NAME}Hierarchy.txt")
if(${VTK_VERSION_MAJOR} VERSION_LESS 9)
if(${VTK_VERSION_MAJOR}.${VTK_VERSION_MINOR} VERSION_LESS "8.2")
set(_wrap_hierarchy_stamp_file ${CMAKE_CURRENT_BINARY_DIR}/${MY_KIT_NAME}Hierarchy.stamp.txt)
endif()
set(${MY_KIT_NAME}_WRAP_HIERARCHY_FILE "${_wrap_hierarchy_file}" CACHE INTERNAL "${MY_KIT_NAME} wrap hierarchy file" FORCE)
......@@ -210,7 +210,7 @@ macro(vtkMacroKitPythonWrap)
# hierarchy file is created.
# XXX Use target_sources if cmake_minimum_required >= 3.1
get_target_property(_kit_srcs ${MY_KIT_NAME} SOURCES)
if(${VTK_VERSION_MAJOR} VERSION_LESS 9)
if(${VTK_VERSION_MAJOR}.${VTK_VERSION_MINOR} VERSION_LESS "8.2")
list(APPEND _kit_srcs ${_wrap_hierarchy_stamp_file})
else()
list(APPEND _kit_srcs ${_wrap_hierarchy_file})
......
......@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.5)
set(_msg "Setting C++ standard")
message(STATUS "${_msg}")
if(NOT DEFINED CMAKE_CXX_STANDARD)
if("${Slicer_VTK_VERSION_MAJOR}" MATCHES "^(8|9)$" OR DEFINED Qt5_DIR)
if("${Slicer_VTK_VERSION_MAJOR}" STREQUAL "8" OR DEFINED Qt5_DIR)
set(CMAKE_CXX_STANDARD 11)
else()
set(CMAKE_CXX_STANDARD 98)
......@@ -304,12 +304,17 @@ mark_as_superbuild(Slicer_BUILD_PARAMETERSERIALIZER_SUPPORT)
set(_default_vtk "7")
if(DEFINED Qt5_DIR)
set(_default_vtk "9")
set(_default_vtk "8")
endif()
set(Slicer_VTK_VERSION_MAJOR ${_default_vtk} CACHE STRING "The VTK major version (7, 8 or 9).")
set_property(CACHE Slicer_VTK_VERSION_MAJOR PROPERTY STRINGS "7" "8" "9")
if(NOT "${Slicer_VTK_VERSION_MAJOR}" MATCHES "^(7|8|9)$")
message(FATAL_ERROR "error: Slicer_VTK_VERSION_MAJOR must be 7, 8 or 9.")
set(Slicer_VTK_VERSION_MAJOR ${_default_vtk} CACHE STRING "The VTK major version (7 or 8).")
set_property(CACHE Slicer_VTK_VERSION_MAJOR PROPERTY STRINGS "7" "8")
if(NOT "${Slicer_VTK_VERSION_MAJOR}" MATCHES "^(7|8)$")
if("${Slicer_VTK_VERSION_MAJOR}" STREQUAL "9")
set(Slicer_VTK_VERSION_MAJOR 8 CACHE STRING "The VTK major version (7 or 8)." FORCE)
message(WARNING "Forcing Slicer_VTK_VERSION_MAJOR to 8 because VTK version was changed from 9.0 to 8.2. See http://vtk.1045678.n5.nabble.com/Discussion-OK-to-change-VTK-s-version-number-from-9-0-to-8-2-tt5748702.html")
else()
message(FATAL_ERROR "error: Slicer_VTK_VERSION_MAJOR must be 7 or 8.")
endif()
endif()
mark_as_superbuild(Slicer_VTK_VERSION_MAJOR)
......@@ -435,7 +440,7 @@ set(Slicer_EXTENSIONS_DIRBASENAME "Extensions")
set(Slicer_EXTENSIONS_DIRNAME "${Slicer_EXTENSIONS_DIRBASENAME}-${Slicer_WC_REVISION}")
#-----------------------------------------------------------------------------
# VTKv9 - Slicer_VTK_COMPONENTS
# Slicer VTK Options
#-----------------------------------------------------------------------------
if(Slicer_VTK_VERSION_MAJOR STREQUAL "7")
set(_backend "OpenGL")
......@@ -470,6 +475,9 @@ message(STATUS " Slicer_VTK_RENDERING_BACKEND is ${Slicer_VTK_RENDERING_BACKEND
message(STATUS " Slicer_VTK_SMP_IMPLEMENTATION_TYPE is ${Slicer_VTK_SMP_IMPLEMENTATION_TYPE}")
message(STATUS " Slicer_VTK_VERSION_MAJOR is ${Slicer_VTK_VERSION_MAJOR}")
#-----------------------------------------------------------------------------
# Slicer_VTK_COMPONENTS
#-----------------------------------------------------------------------------
set(Slicer_VTK_COMPONENTS
vtkFiltersExtraction
vtkFiltersFlowPaths
......
......@@ -123,8 +123,8 @@ if((NOT DEFINED VTK_DIR OR NOT DEFINED VTK_SOURCE_DIR) AND NOT Slicer_USE_SYSTEM
set(_git_tag)
if("${Slicer_VTK_VERSION_MAJOR}" STREQUAL "7")
set(_git_tag "43f6ee36f6e28c8347768bd97df4d767da6b4ce7")
elseif("${Slicer_VTK_VERSION_MAJOR}" STREQUAL "9")
set(_git_tag "efdb5a2ba9d0af062005b788632b3155e2351736")
elseif("${Slicer_VTK_VERSION_MAJOR}" STREQUAL "8")
set(_git_tag "edb9030dc4019f885baffa291a16ddc7aa4e15cd")
else()
message(FATAL_ERROR "error: Unsupported Slicer_VTK_VERSION_MAJOR: ${Slicer_VTK_VERSION_MAJOR}")
endif()
......
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