Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary In situations like superbuilds or other downstream usage, the `AMReX::FFTW` should only be created once. ## Additional background First seen in conda-forge/impactx-feedstock#42 ``` ... -- Downloading ABLASTR ... -- ABLASTR repository: https://github.com/ECP-WarpX/WarpX.git (25.01) -- Searching for pre-installed AMReX ... -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5") found components: CXX -- Found AMReXFFTW: $PREFIX/lib/libfftw3.so;$PREFIX/lib/libfftw3f.so -- AMReX: Found version '25.01' -- HDF5 C compiler wrapper is unable to compile a minimal HDF5 program. -- Found HDF5: $PREFIX/lib/libhdf5.so -- Found ADIOS2: $PREFIX/lib/cmake/adios2/adios2-config.cmake (found version "2.10.1") found components: C CXX -- openPMD-api: Found version '0.16.0' -- Checking for module 'fftw3' -- Found fftw3, version 3.3.10 -- Found FFTW: $PREFIX -- FFTW: Found OpenMP support -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success WarpX build configuration: ... -- ABLASTR: Using version '' () -- HDF5 C compiler wrapper is unable to compile a minimal HDF5 program. -- openPMD-api: Found version '0.16.0' -- Found Python: $PREFIX/bin/python (found suitable version "3.10.16", minimum required is "3.8") found components: Interpreter Development.Module -- Performing Test HAS_FLTO -- Performing Test HAS_FLTO - Success -- Found pybind11: $PREFIX/include (found version "2.13.6") -- pybind11: Found version '2.13.6' CMake Error at /home/conda/feedstock_root/build_artifacts/impactx_1736481863454/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/cmake/AMReX/AMReXCMakeModules/FindAMReXFFTW.cmake:48 (add_library): add_library cannot create imported target "AMReX::FFTW" because another target with the same name already exists. ``` ## Checklist The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] 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