Skip to content

Commit db89ee5

Browse files
committed
BUG: internal fix for itk_generate_factory_registration
Also improved formatting for cmake warning messages. Removes extra white spaces, and corrects CMake variable.
1 parent 103e0a9 commit db89ee5

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

CMake/ITKFactoryRegistration.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ macro(itk_generate_factory_registration)
204204
set(_factory_list ${variadic_args})
205205
endif()
206206

207-
foreach(_factory_name ${ITK_FACTORY_LIST})
207+
foreach(_factory_name ${_factory_list})
208208
string(TOUPPER ${_factory_name} factory_uc)
209209
string(TOLOWER ${_factory_name} factory_lc)
210210
set(LIST_OF_${factory_uc}_FORMATS "")
@@ -227,8 +227,9 @@ macro(itk_generate_factory_registration)
227227
if(ITK_NO_${factory_uc}_FACTORY_REGISTER_MANAGER)
228228
# pass generation this factory registration
229229
elseif(_factory_name MATCHES "IO" AND ITK_NO_IO_FACTORY_REGISTER_MANAGER)
230-
message(WARNING "ITK_NO_IO_FACTORY_REGISTER_MANAGER CMake variable
231-
is deprecated. Use ITK_NO_${_factory_name}_FACTORY_REGISTER_MANAGER")
230+
message(WARNING
231+
"ITK_NO_IO_FACTORY_REGISTER_MANAGER CMake variable is "
232+
"deprecated. Use ITK_NO_${factory_uc}_FACTORY_REGISTER_MANAGER")
232233
else()
233234
_itk_configure_FactoryRegisterManager("${_factory_name}" "${LIST_OF_${factory_uc}_FORMATS}")
234235
endif()

CMake/UseITK.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ foreach(_factory_name ${ITK_FACTORY_LIST})
5151
if (_factory_name MATCHES "IO" AND
5252
ITK_NO_IO_FACTORY_REGISTER_MANAGER)
5353
if( "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.4")
54-
message(WARNING "ITK_NO_IO_FACTORY_REGISTER_MANAGER CMake
55-
variable is deprecated. Use ITK_NO_${_factory_uc}_FACTORY_REGISTER_MANAGER")
54+
message(WARNING
55+
"ITK_NO_IO_FACTORY_REGISTER_MANAGER CMake variable is "
56+
"deprecated. Use ITK_NO_${_factory_uc}_FACTORY_REGISTER_MANAGER")
5657
endif()
5758
continue()
5859
endif()

0 commit comments

Comments
 (0)