Repository navigation
Conversation
Replace the itkExternal_FFTW ExternalProject, which built the library twice outside the module system, with a standard third-party module. FFTW is fetched once and each precision is added as a subdirectory. FindFFTW now provides FFTW::Double and FFTW::Float imported targets, and the module re-runs it for downstream projects through the usual EXPORT_CODE hooks. Remove the FFTW paths from ITKConfig.cmake.
Member
|
@blowekamp I tested this locally against its base and pushed possible fixes as separate commits on top of your head (
The GPL status message is fine as is. What was tested (macOS arm64)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Build FFTW as a standard
ITKFFTWthird-party module usingFetchContent, replacing theExternalProjectinitkExternal_FFTW.cmake. Downstream projects get FFTW throughITK::ITKFFTModuleinstead of FFTW-specificITKConfig.cmakevariables.Design
FFTW_ENABLE_*).FindFFTWtakesCOMPONENTS Double Floatand definesFFTW::Double/FFTW::Float. For system FFTW the module setsITKFFTW_EXPORT_CODE_INSTALL/BUILD(as ZLIB/TIFF do) so downstream projects re-run the finder;FFTW_ROOTis hinted to the FFTW ITK was built with unless the app sets one.ITK::namespace so no barefftw3*compatibility targets are exported.Module_ITKFFTW=ONwith neitherITK_USE_FFTWDnorITK_USE_FFTWFbuilds double precision.ITKModuleMacros.cmake: source-less modules now register inITKTargets_MODULES. Without this, an install whose only module is a system-library module exported no targets.ITK_FFTW_INCLUDE_PATH/ITK_FFTW_LIBDIRfromITKConfig.cmake(no remaining users in the tree).AI assistance
Test results
Clean builds on Linux x86_64 (GCC 13), each from an empty build directory:
ctest -R 'FFT|FFTW'94/94 passed in each.ITKFFTW, FFTW disabled, andModule_ITKFFTW=ONalone (bundled and system): passed.ITKFFTwrappers built; FFTW forward/inverse roundtrips passed in all four type/dimension combinations.ITKFFTWonly,UseITK, and a project defining its ownfftw3*targets: 32/32 passed. Linked libraries were checked to be the expected FFTW in each case.Not tested: Windows, macOS, MKL, cuFFTW.
PR Checklist