Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AMReX::FFTW Once #4293

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions Tools/CMake/FindAMReXFFTW.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ if(NOT AMReX_FFTW_SEARCH IN_LIST AMReX_FFTW_SEARCH_VALUES)
endif()
mark_as_advanced(AMReX_FFTW_SEARCH)

# Create imported target
add_library(AMReX::FFTW INTERFACE IMPORTED GLOBAL)

function(fftw_find_precision HFFTWp)
if(AMReX_FFTW_SEARCH STREQUAL CMAKE)
find_package(FFTW3${HFFTWp} CONFIG REQUIRED)
Expand Down Expand Up @@ -138,9 +135,14 @@ function(fftw_find_precision HFFTWp)
endif()
endfunction()

# floating point precision suffixes: we request float and double precision
fftw_find_precision("")
fftw_find_precision("f")
if(NOT TARGET AMReX::FFTW)
# Create imported target
add_library(AMReX::FFTW INTERFACE IMPORTED GLOBAL)

# floating point precision suffixes: we request float and double precision
fftw_find_precision("")
fftw_find_precision("f")
endif()

# Vars for CMake config
include(FindPackageHandleStandardArgs)
Expand Down
Loading