From 6384cd067ae957ef61d21b25f92df44360c6b990 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Fri, 6 Oct 2023 22:08:03 -0400 Subject: [PATCH 1/2] BUG: Fix ITKGroup identification with multiline itk_module Addresses #4248 where the ITKTestKernel module was not enabled as part of ITKGroup_Core. --- CMake/ITKGroups.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMake/ITKGroups.cmake b/CMake/ITKGroups.cmake index 0a96f0a13cd..4c8f6d2d1bf 100644 --- a/CMake/ITKGroups.cmake +++ b/CMake/ITKGroups.cmake @@ -78,12 +78,12 @@ foreach(group ${group_list}) set(_${group}_module_list) file(GLOB_RECURSE _${group}_module_files ${ITK_SOURCE_DIR}/Modules/${group}/itk-module.cmake) foreach(_module_file ${_${group}_module_files}) - file(STRINGS ${_module_file} _module_line REGEX "itk_module[ \n]*\\([ \n]*[A-Za-z0-9]*") + file(READ ${_module_file} _module_file_content) string( REGEX MATCH - "(\\([ \n]*)([A-Za-z0-9]*)" + "itk_module[ \n]*(\\([ \n]*)([A-Za-z0-9]*)" _module_name - ${_module_line}) + ${_module_file_content}) set(_module_name ${CMAKE_MATCH_2}) set(_${_module_name}_module_line ${_module_line}) list(APPEND _${group}_module_list ${_module_name}) From 3568eeec2b41f6abba497264ee8e4699279fa846 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Fri, 6 Oct 2023 22:13:32 -0400 Subject: [PATCH 2/2] STYLE: Lower case for function name in ITKModuleEnablement Use all lower case following the convention and the function's invocation. --- CMake/ITKModuleEnablement.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMake/ITKModuleEnablement.cmake b/CMake/ITKModuleEnablement.cmake index c5c3e93e9ad..0f3366f1d39 100644 --- a/CMake/ITKModuleEnablement.cmake +++ b/CMake/ITKModuleEnablement.cmake @@ -1,7 +1,7 @@ # This script sorts out the module dependencies, provides user options for customizing # the list of modules to be built, and enables modules accordingly. -macro(itk_module_load_DAG) +macro(itk_module_load_dag) set(ITK_MODULES_ALL) file( GLOB_RECURSE meta