forked from sxs-collaboration/spectre
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
56 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Distributed under the MIT License. | ||
# See LICENSE.txt for details. | ||
|
||
# Find FFTW3 (The Fastest Fourier Transform in the West) | ||
# http://www.fftw.org/ | ||
# | ||
# Defines the `FFTW::FFTW` target to link against. | ||
|
||
if(NOT FFTW_ROOT) | ||
# Need to set to empty to avoid warnings with --warn-uninitialized | ||
set(FFTW_ROOT "") | ||
set(FFTW_ROOT $ENV{FFTW_ROOT}) | ||
endif() | ||
|
||
find_path(FFTW_INCLUDE_DIR | ||
NAMES fftw3.h | ||
PATH_SUFFIXES include | ||
HINTS ${FFTW_ROOT} | ||
) | ||
|
||
find_library(FFTW_LIB | ||
NAMES fftw3 | ||
PATH_SUFFIXES lib64 lib | ||
HINTS ${FFTW_ROOT} | ||
) | ||
|
||
if (FFTW_INCLUDE_DIR AND FFTW_LIB) | ||
add_library(FFTW::FFTW INTERFACE IMPORTED) | ||
target_include_directories(FFTW::FFTW INTERFACE ${FFTW_INCLUDE_DIR}) | ||
target_link_libraries(FFTW::FFTW INTERFACE ${FFTW_LIB}) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(FFTW | ||
REQUIRED_VARS FFTW_INCLUDE_DIR FFTW_LIB) | ||
mark_as_advanced(FFTW_INCLUDE_DIR FFTW_LIB) |
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