You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
This improves the FFTW CMake find logic based on the scripts that I
developed for HiPACE++/WarpX/ImpactX to find FFTW on various platforms.
It helps to find FFTW on Windows, where it is installed by default with
CMake, and it uses more details from PkgConfig files on Linux/macOS,
such as forwarding defines, using OpenMP acceleration if available.
It also chooses sensible defaults to work around known FFTW build system
bugs, linked inline. There are also options added to control the
defaults, e.g., in package managers that use a different default (e.g.,
CMake FFTW install on Linux/macOS).
## Additional background
See build issues in
BLAST-ImpactX/impactx#760 (comment)
On Windows, try searching for `FFTW3(f)Config.cmake` files first,
because:
- Installed `.pc` files wrongly and unconditionally add `-lm`
- FFTW/fftw3#236
On Linux & macOS, the Autotools install tries to emulate a CMake config
file, but has a bug:
- FFTW/fftw3#235
- Thus, by default rely on `.pc` files because we cannot know which
install was choosen (otherwise, there is an option for it named
`AMReX_FFTW_SEARCH`).
## Checklist
The proposed changes:
- [ ] fix a bug or incorrect behavior in AMReX
- [x] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX
users
- [ ] include documentation in the code and/or rst files, if appropriate
0 commit comments