Skip to content

Commit

Permalink
ENH: Remove support for wrapping with WRAP_EXPLICIT
Browse files Browse the repository at this point in the history
The EXPLICIT generation of all symbols for C++ appears to
not be working properly, and is not tested.
  • Loading branch information
hjmjohnson committed Feb 23, 2022
1 parent 88f3da1 commit 0eac15b
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 196 deletions.
6 changes: 2 additions & 4 deletions CMake/ITKConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,8 @@ set(ITK_USE_GPU "@ITK_USE_GPU@")

# Wrapping
set(ITK_WRAPPING "@ITK_WRAPPING@")
# ITK_WRAP_SWIGINTERFACE and ITK_WRAP_CASTXML are set
# to ITK_WRAPPING value.
# ITK_WRAP_DOC and ITK_WRAP_EXPLICIT are disabled by
# default.
# ITK_WRAP_SWIGINTERFACE and ITK_WRAP_CASTXML are set to ITK_WRAPPING value.
# ITK_WRAP_DOC is disabled by default.

if( NOT DEFINED ITK_WRAP_PYTHON)
set(ITK_WRAP_PYTHON "@ITK_WRAP_PYTHON@")
Expand Down
3 changes: 0 additions & 3 deletions CMake/ITKModuleExternal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,11 @@ 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_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_EXPLICIT OR
${itk-module}_WRAP_DOC
)
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/wrapping/CMakeLists.txt"
Expand Down
17 changes: 1 addition & 16 deletions Wrapping/Generators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ endmacro()

macro(itk_wrap_module_all_generators library_name)
itk_wrap_modules_set_prefix()
if(${module_prefix}_WRAP_EXPLICIT)
itk_wrap_module_explicit("${library_name}")
endif()
if(${module_prefix}_WRAP_CASTXML)
itk_wrap_module_castxml("${library_name}")
endif()
Expand All @@ -44,9 +41,6 @@ endmacro()

macro(itk_wrap_submodule_all_generators module)
itk_wrap_modules_set_prefix()
if(${module_prefix}_WRAP_EXPLICIT)
itk_wrap_submodule_explicit("${module}")
endif()
if(${module_prefix}_WRAP_CASTXML)
itk_wrap_submodule_castxml("${module}")
endif()
Expand All @@ -63,9 +57,6 @@ endmacro()

macro(itk_end_wrap_submodule_all_generators module)
itk_wrap_modules_set_prefix()
if(${module_prefix}_WRAP_EXPLICIT)
itk_end_wrap_submodule_explicit("${module}")
endif()
if(${module_prefix}_WRAP_CASTXML)
itk_end_wrap_submodule_castxml("${module}")
endif()
Expand Down Expand Up @@ -105,9 +96,6 @@ endmacro()

macro(itk_wrap_include_all_generators inc)
itk_wrap_modules_set_prefix()
if(${module_prefix}_WRAP_EXPLICIT)
itk_wrap_include_explicit("${inc}")
endif()
if(${module_prefix}_WRAP_CASTXML)
itk_wrap_include_castxml("${inc}")
endif()
Expand All @@ -126,9 +114,6 @@ endmacro()

macro(itk_wrap_one_type_all_generators wrap_method wrap_class swig_name template_params)
itk_wrap_modules_set_prefix()
if(${module_prefix}_WRAP_EXPLICIT)
itk_wrap_one_type_explicit("${wrap_method}" "${wrap_class}" "${swig_name}" "${template_params}")
endif()
if(${module_prefix}_WRAP_CASTXML)
itk_wrap_one_type_castxml("${wrap_method}" "${wrap_class}" "${swig_name}" "${template_params}")
endif()
Expand Down Expand Up @@ -217,7 +202,7 @@ foreach(lang ${generators})
set(WRAP_ITK_UNUSED_GENERATORS ${WRAP_ITK_UNUSED_GENERATORS} "${lang}")
endif()
endforeach()
mark_as_advanced(${module_prefix}_WRAP_EXPLICIT ${module_prefix}_WRAP_DOC)
mark_as_advanced(${module_prefix}_WRAP_DOC)
set(WRAP_ITK_GENERATORS ${WRAP_ITK_GENERATORS} CACHE INTERNAL "Internal generators list.")
set(WRAP_ITK_UNUSED_GENERATORS ${WRAP_ITK_UNUSED_GENERATORS} CACHE INTERNAL "Internal unused generators list.")

Expand Down
137 changes: 0 additions & 137 deletions Wrapping/Generators/Explicit/CMakeLists.txt

This file was deleted.

11 changes: 0 additions & 11 deletions Wrapping/Generators/Explicit/Explicit.cxx.in

This file was deleted.

13 changes: 0 additions & 13 deletions Wrapping/Generators/Explicit/Explicit.h.in

This file was deleted.

4 changes: 0 additions & 4 deletions Wrapping/Generators/Python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,6 @@ ${DO_NOT_WAIT_FOR_THREADS_DECLS}
if(${module_prefix}_WRAP_DOC)
add_dependencies(${lib} ${WRAPPER_LIBRARY_NAME}Doxygen)
endif()
if(${module_prefix}_WRAP_EXPLICIT AND NOT ${WRAPPER_LIBRARY_NAME} STREQUAL ITKPyBase)
target_link_libraries(${lib} LINK_PUBLIC ${WRAPPER_LIBRARY_NAME}Explicit)
add_dependencies(${lib} ${WRAPPER_LIBRARY_NAME}Explicit)
endif()
set(_component_module "")
if(WRAP_ITK_INSTALL_COMPONENT_PER_MODULE)
if("${WRAPPER_LIBRARY_NAME}" MATCHES "^ITK(PyUtils|PyBase)$")
Expand Down
5 changes: 0 additions & 5 deletions Wrapping/Generators/SwigInterface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,6 @@ macro(itk_end_wrap_module_swig_interface)
set(ENV{ITK_STUB_TEMPLATE_IMPORTS} "$ENV{ITK_STUB_TEMPLATE_IMPORTS}from .${module}Template import *;")
set(ENV{ITK_STUB_PROXY_IMPORTS} "$ENV{ITK_STUB_PROXY_IMPORTS}from .${module}Proxy import *;")
endif()


if(${module_prefix}_WRAP_EXPLICIT)
list(APPEND opts --include "${WRAPPER_LIBRARY_NAME}Explicit.h")
endif()
endforeach()

# the master idx file (mdx file)
Expand Down
3 changes: 0 additions & 3 deletions Wrapping/TypedefMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ macro(itk_end_wrap_module)
endif()

itk_wrap_modules_set_prefix()
if(${module_prefix}_WRAP_EXPLICIT)
itk_end_wrap_module_explicit()
endif()
if(${module_prefix}_WRAP_CASTXML)
itk_end_wrap_module_castxml()
endif()
Expand Down

0 comments on commit 0eac15b

Please sign in to comment.