-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## 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
- Loading branch information
Showing
1 changed file
with
119 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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