Skip to content

Commit

Permalink
ENH: Remove support for wrapping with RUBY
Browse files Browse the repository at this point in the history
The RUBY bindings are not tested.  This batch of untested
code makes refactoring the wrapping process more difficult
as it requires changes to code that is very unlikely to be
used.

NOTE: parts of the JAVA, PERL, & RUBY wrapping support has
been commented out since a17865c 2018-07-07, and does
not work for wrapping currently.
  • Loading branch information
hjmjohnson committed Feb 23, 2022
1 parent 2f9ee4e commit da7804c
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 1,316 deletions.
6 changes: 0 additions & 6 deletions CMake/ITKConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ set(ITK_WRAPPING "@ITK_WRAPPING@")
if( NOT DEFINED ITK_WRAP_PYTHON)
set(ITK_WRAP_PYTHON "@ITK_WRAP_PYTHON@")
endif()
if( NOT DEFINED ITK_WRAP_JAVA)
set(ITK_WRAP_JAVA "@ITK_WRAP_JAVA@")
endif()
if(NOT DEFINED ITK_WRAP_RUBY)
set(ITK_WRAP_RUBY "@ITK_WRAP_RUBY@")
endif()

# Set up the rest of the variables that WrapITK was built with.
set(ITK_WRAP_unsigned_char @ITK_WRAP_unsigned_char@)
Expand Down
6 changes: 0 additions & 6 deletions CMake/ITKModuleExternal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,13 @@ endif()
if(ITK_WRAPPING)
CMAKE_DEPENDENT_OPTION(${itk-module}_WRAP_PYTHON "Build Python support." ${ITK_WRAP_PYTHON}
"ITK_WRAP_PYTHON" OFF)
CMAKE_DEPENDENT_OPTION(${itk-module}_WRAP_JAVA "Build Java support." ${ITK_WRAP_JAVA}
"ITK_WRAP_JAVA" OFF)
CMAKE_DEPENDENT_OPTION(${itk-module}_WRAP_RUBY "Build Ruby support." ${ITK_WRAP_RUBY}
"ITK_WRAP_RUBY" OFF)
CMAKE_DEPENDENT_OPTION(${itk-module}_WRAP_EXPLICIT "Build Explicit support." OFF
"ITK_WRAP_EXPLICIT" OFF)
CMAKE_DEPENDENT_OPTION(${itk-module}_WRAP_DOC "Build Doxygen support." OFF
"ITK_WRAP_DOC" OFF)
set(${itk-module}_WRAP_CASTXML ${ITK_WRAPPING})
set(${itk-module}_WRAP_SWIGINTERFACE ${ITK_WRAPPING})
if( (${itk-module}_WRAP_PYTHON OR
${itk-module}_WRAP_JAVA OR
${itk-module}_WRAP_RUBY OR
${itk-module}_WRAP_EXPLICIT OR
${itk-module}_WRAP_DOC
)
Expand Down
1 change: 0 additions & 1 deletion Wrapping/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ set(WRAP_ITK_INSTALL_PREFIX "${path}" CACHE INTERNAL "subpath where where most o
# Output directories.
set(WRAP_ITK_CONFIG_DIR "${WrapITK_SOURCE_DIR}/")
set(WRAP_ITK_CMAKE_DIR "${WrapITK_SOURCE_DIR}")
set(ITK_WRAP_JAVA_DIR "${WrapITK_BINARY_DIR}/Java")
set(WRAPPER_MASTER_INDEX_OUTPUT_DIR "${ITK_DIR}/Wrapping/Typedefs" CACHE INTERNAL "typedefs dir")

if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
Expand Down
2 changes: 0 additions & 2 deletions Wrapping/ConfigureWrapping.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#
# The following variables should be set before including this file:
# ITK_WRAP_PYTHON
# ITK_WRAP_JAVA
# ITK_WRAP_unsigned_char
# ITK_WRAP_unsigned_short
# ITK_WRAP_unsigned_long_long
Expand All @@ -20,7 +19,6 @@
# ITK_WRAP_covariant_vector_float
# ITK_WRAP_covariant_vector_double
# ITK_WRAP_IMAGE_DIMS
# ITK_WRAP_JAVA_DIR -- directory for java classes to be placed
# WRAP_ITK_CONFIG_DIR -- directory where XXX.in files for CONFIGURE_FILE
# commands are to be found.
# WRAP_ITK_CMAKE_DIR -- directory where XXX.cmake files are to be found
Expand Down
49 changes: 0 additions & 49 deletions Wrapping/Generators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,13 @@ endmacro()
# the macros in charge of dispatching to the language specific macros

macro(itk_wrap_modules_all_generators)
#! if(${module_prefix}_WRAP_JAVA AND WRAPPER_LIBRARY_JAVA)
#! INIT_itk_wrap_module_java()
#! endif()
itk_wrap_modules_set_prefix()
if(${module_prefix}_WRAP_PYTHON)
# Wrap PyBase
if(NOT EXTERNAL_WRAP_ITK_PROJECT)
add_subdirectory(${ITK_WRAP_PYTHON_SOURCE_DIR}/PyBase)
endif()
endif()
if(${module_prefix}_WRAP_JAVA)
if(NOT EXTERNAL_WRAP_ITK_PROJECT)
add_subdirectory(${ITK_WRAP_JAVA_SOURCE_DIR}/JavaBase)
endif()
endif()
if(${module_prefix}_WRAP_RUBY)
if(NOT EXTERNAL_WRAP_ITK_PROJECT)
add_subdirectory(${ITK_WRAP_RUBY_SOURCE_DIR}/RbBase)
endif()
endif()
endmacro()


Expand All @@ -52,12 +39,6 @@ macro(itk_wrap_module_all_generators library_name)
if(${module_prefix}_WRAP_PYTHON AND WRAPPER_LIBRARY_PYTHON)
itk_wrap_module_python("${library_name}")
endif()
if(${module_prefix}_WRAP_RUBY AND WRAPPER_LIBRARY_RUBY)
itk_wrap_module_ruby("${library_name}")
endif()
if(${module_prefix}_WRAP_JAVA AND WRAPPER_LIBRARY_JAVA)
itk_wrap_module_java("${library_name}")
endif()
endmacro()


Expand All @@ -78,12 +59,6 @@ macro(itk_wrap_submodule_all_generators module)
if(${module_prefix}_WRAP_PYTHON AND WRAPPER_LIBRARY_PYTHON)
itk_wrap_submodule_python("${module}" "${WRAPPER_LIBRARY_NAME}")
endif()
if(${module_prefix}_WRAP_RUBY AND WRAPPER_LIBRARY_RUBY)
itk_wrap_submodule_ruby("${module}")
endif()
if(${module_prefix}_WRAP_JAVA AND WRAPPER_LIBRARY_JAVA)
itk_wrap_submodule_java("${module}")
endif()
endmacro()

macro(itk_end_wrap_submodule_all_generators module)
Expand All @@ -100,12 +75,6 @@ macro(itk_end_wrap_submodule_all_generators module)
if(${module_prefix}_WRAP_PYTHON AND WRAPPER_LIBRARY_PYTHON)
itk_end_wrap_submodule_python("${module}")
endif()
if(${module_prefix}_WRAP_RUBY AND WRAPPER_LIBRARY_RUBY)
itk_end_wrap_submodule_ruby("${module}")
endif()
if(${module_prefix}_WRAP_JAVA AND WRAPPER_LIBRARY_JAVA)
itk_end_wrap_submodule_java("${module}")
endif()
if(${module_prefix}_WRAP_DOC)
itk_end_wrap_submodule_DOC()
endif()
Expand All @@ -120,9 +89,6 @@ macro(itk_wrap_named_class_all_generators class swig_name)
if(${module_prefix}_WRAP_PYTHON AND WRAPPER_LIBRARY_PYTHON)
itk_wrap_named_class_python("${class}" "${swig_name}")
endif()
if(${module_prefix}_WRAP_RUBY AND WRAPPER_LIBRARY_RUBY)
itk_wrap_named_class_ruby("${class}" "${swig_name}")
endif()
if(${module_prefix}_WRAP_DOC)
itk_wrap_named_class_DOC("${class}" "${swig_name}")
endif()
Expand Down Expand Up @@ -158,9 +124,6 @@ macro(itk_wrap_template_all_generators name types)
if(${module_prefix}_WRAP_PYTHON AND WRAPPER_LIBRARY_PYTHON)
itk_wrap_template_python("${name}" "${types}")
endif()
if(${module_prefix}_WRAP_RUBY AND WRAPPER_LIBRARY_RUBY)
itk_wrap_template_ruby("${name}" "${types}")
endif()
endmacro()


Expand All @@ -181,12 +144,6 @@ macro(itk_wrap_one_type_all_generators wrap_method wrap_class swig_name template
if(${module_prefix}_WRAP_PYTHON AND WRAPPER_LIBRARY_PYTHON)
itk_wrap_one_type_python("${wrap_method}" "${wrap_class}" "${swig_name}" "${template_params}")
endif()
if(${module_prefix}_WRAP_RUBY AND WRAPPER_LIBRARY_RUBY)
itk_wrap_one_type_ruby("${wrap_method}" "${wrap_class}" "${swig_name}" "${template_params}")
endif()
if(${module_prefix}_WRAP_JAVA AND WRAPPER_LIBRARY_JAVA)
itk_wrap_one_type_java("${wrap_method}" "${wrap_class}" "${swig_name}" "${template_params}")
endif()
endmacro()


Expand All @@ -198,12 +155,6 @@ macro(itk_wrap_simple_type_all_generators wrap_class swig_name)
if(${module_prefix}_WRAP_PYTHON AND WRAPPER_LIBRARY_PYTHON)
itk_wrap_simple_type_python("${wrap_class}" "${swig_name}")
endif()
if(${module_prefix}_WRAP_RUBY AND WRAPPER_LIBRARY_RUBY)
itk_wrap_simple_type_ruby("${wrap_class}" "${swig_name}")
endif()
if(${module_prefix}_WRAP_JAVA AND WRAPPER_LIBRARY_JAVA)
itk_wrap_simple_type_java("${wrap_class}" "${swig_name}")
endif()
endmacro()


Expand Down
Loading

0 comments on commit da7804c

Please sign in to comment.