Skip to content

Commit

Permalink
STYLE: Remove all vestiges of ITKv3 code
Browse files Browse the repository at this point in the history
ITKv5 will no longer support ITKv3 code constructs.

Change-Id: I4088609ac7840d129a1a753b0e6c3fa7f2313597
  • Loading branch information
hjmjohnson committed Jan 6, 2018
1 parent 5ea01b1 commit 8cd2517
Show file tree
Hide file tree
Showing 92 changed files with 138 additions and 7,772 deletions.
2 changes: 1 addition & 1 deletion CMake/ITKConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set(ITK_VERSION_MINOR "@ITK_VERSION_MINOR@")
set(ITK_VERSION_PATCH "@ITK_VERSION_PATCH@")

# If ITK was built with version 3 compatibility features.
set(ITKV3_COMPATIBILITY "@ITKV3_COMPATIBILITY@")
set(ITKV4_COMPATIBILITY "@ITKV4_COMPATIBILITY@")

# Remove all legacy code completely.
set(ITK_LEGACY_REMOVE "@ITK_LEGACY_REMOVE@")
Expand Down
23 changes: 11 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ set(ITK_MODULES_DIR "${ITK_BINARY_DIR}/${ITK_INSTALL_PACKAGE_DIR}/Modules")
#-----------------------------------------------------------------------------
# Provide compatibility options.
option(ITKV3_COMPATIBILITY "Enable compatibility with ITK3.x when possible." OFF)
option(ITKV4_COMPATIBILITY "Enable compatibility with ITK4.x when possible." OFF)
# During major release updates deprecated interface may be needed for backwards compatibility
option(ITK_LEGACY_REMOVE "Remove current legacy code completely." OFF)
# During minor releases bugs may be identified that identify broken interface, or
Expand All @@ -237,26 +238,24 @@ if(ITK_WRAPPING)
else()
option(ITK_LEGACY_SILENT "Silence all legacy code messages." OFF)
endif()
mark_as_advanced(ITK_LEGACY_SILENT ITK_LEGACY_REMOVE ITK_FUTURE_LEGACY_REMOVE ITK_V3_COMPATIBILITY)
mark_as_advanced(ITK_LEGACY_SILENT ITK_LEGACY_REMOVE ITK_FUTURE_LEGACY_REMOVE ITK_V4_COMPATIBILITY)


if (NOT ITK_LEGACY_SILENT AND ITKV3_COMPATIBILITY)
message(WARNING "ITKV3_COMPATIBILITY will be removed starting in ITK version 5.0.")
endif()

# The disabling of legacy code, and the ITKv3 compatibility option can not both be
# requested. If removal of legacy code is requested, then ITKV3_COMPATIBILITY must
# The disabling of legacy code, and the ITKv4 compatibility option can not both be
# requested. If removal of legacy code is requested, then ITKV4_COMPATIBILITY must
# be off.
if(ITKV3_COMPATIBILITY AND ITK_LEGACY_REMOVE)
message(FATAL_ERROR "Invlaid configuration: ITKV3_COMPATIBILITY AND ITK_LEGACY_REMOVE can not both be ON")
if(ITKV4_COMPATIBILITY AND ITK_LEGACY_REMOVE)
message(FATAL_ERROR "Invalid configuration: ITKV4_COMPATIBILITY AND ITK_LEGACY_REMOVE can not both be ON")
endif()
if (NOT ITK_LEGACY_SILENT AND ITKV3_COMPATIBILITY)
message(WARNING "ITKV3_COMPATIBILITY is removed starting in ITK version 5.0.")
endif()

#-----------------------------------------------------------------------------
# ITK build classes that are in the review process
# ITK_USE_REVIEW is deprecated, only kept for backward compatibility
if (ITK_USE_REVIEW AND NOT Module_ITKReview)
message(WARNING "ITK_USE_REVIEW is deprecated, please use Module_ITKReview to turn Review module ON/OFF")
set(Module_ITKReview ON CACHE BOOL "Module containing code from the Review directory of ITKv3." FORCE)
set(Module_ITKReview ON CACHE BOOL "Module containing code from the Review directory of ITKv4." FORCE)
endif()

#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -311,7 +310,7 @@ if( ITK_USE_FFTWD OR ITK_USE_FFTWF )
include(itkExternal_FFTW)
endif()

if(NOT ITKV3_COMPATIBILITY)
if(NOT ITKV4_COMPATIBILITY)
set(ITK_USE_64BITS_IDS_DEFAULT "OFF")
# Note WIN32 is true when targeting any windows system
if(CMAKE_SIZEOF_VOID_P EQUAL "8" AND WIN32)
Expand Down
97 changes: 97 additions & 0 deletions Documentation/Migration/RemoveITKv3Code.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Change SYSTEM "https://itk.org/migrationv4/ITKMigration.dtd">

<!--**
**
** RemoveITKv3Code.xml
**
** Please, make sure this file validates the following w3c test before committing it: http://validator.w3.org
**-->
<Change>
<!--**
** Title for the online migration page
**-->
<Title>
Remove ITKv3 Code
</Title>

<!--**
** The author of the change
**-->
<Author>
b'Hans Johnson'
</Author>

<!--**
** Date of creation for the XML document
**-->
<Date>
2017-12-12
</Date>

<!--**
** Plain text description of the change
** Extracted from git commit messages
**-->
<Description>
<![CDATA[
Remove all ITKv3 code.
]]>
</Description>

<!--**
** Sample code snippets
** Extracted from git diff of changed files in Examples and Testing
**-->
<SampleCode>
<Old>
<![CDATA[
]]>
</Old>

<New>
<![CDATA[
]]>
</New>

</SampleCode>

<!--**
** The change-ids for all commits in the topic branch
**-->
<Gerrit-ChangeId>
</Gerrit-ChangeId>

<!--**
** List of all changed files from the topic branch
**-->
<FileList>
b''
</FileList>

<!--**
** If the migration can be accomplished by a simple string
** substitution, then use the following construct to define
** the substitution rule.
**
** <MigrationFix-Automatic>
** <Old>
** <![CDATA[MipsleledName]]>
** </Old>
** <New>
** <![CDATA[MisspelledName]]>
** </New>
** </MigrationFix-Automatic>
**-->

<!--**
** If the migration can NOT be accomplished by a simple string
** substitution, but potential problem spots can be identified,
** use the following construct to define a migration flag rule.
**
** <MigrationFix-Manual>
** OldFunctionName
** </MigrationFix-Manual>
**-->

</Change>

This file was deleted.

6 changes: 3 additions & 3 deletions Modules/Compatibility/README
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ in future releases.
Deprecated: Any code that provides a feature or function
that is no longer supported in ITKv4

V3Compatibility: This is a place for code where the feature is
still supported in ITKv4, but the API has changed
V4Compatibility: This is a place for code where the feature is
still supported in ITKv5, but the API has changed
this layer allows for easier transition to ITKv4
by providing access to the ITKv3 API.
by providing access to the ITKv4 API.
2 changes: 0 additions & 2 deletions Modules/Compatibility/V3Compatibility/CMakeLists.txt

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8cd2517

Please sign in to comment.