ITK icon indicating copy to clipboard operation
ITK copied to clipboard

Reduce duplication among test kernel factory registration methods

Open tbirdso opened this issue 4 years ago • 1 comments

Motivation

ITKModuleTest.cmake defines the CreateTestDriver and CreateTestDriver_SupportBuildInIOFactories CMake macros for building module tests with the ITKTestKernel module. Having two closely related but independent macros can lead to extra effort and code duplication as discussed in #3002. It would be useful to explore whether CreateTestDriver_SupportBuildInIOFactories can be removed/consolidated.

Details

CreateTestDriver_SupportBuildInIOFactories was introduced in a2c7a16e45a35f3c3988b1dac4d349b0a754fc1f to support tests in Nonunit/IntegratedTest and Nonunit/Review. The main difference between CreateTestDriver and CreateTestDriver_SupportBuildInIOFactories is that the former implements default factory registrations in itkTestDriverIncludeRequiredIOFactories.cxx while the latter relies on an expanded list of registrations in the header file itkTestDriverIncludeBuiltInIOFactories.h.

Most ITK modules rely on CreateTestDriver for building test drivers and registering factories by default with ITKTestKernel. Ideally Nonunit modules could be refactored as necessary to rely on CreateTestDriver rather than CreateTestDriver_SupportBuildInIOFactories so that the list of default factories need only be updated in one place.

tbirdso avatar Dec 28 '21 16:12 tbirdso

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Apr 27 '22 19:04 stale[bot]