aboutsummaryrefslogtreecommitdiff
path: root/CMake/FindFFTW.cmake
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-03-12 09:48:00 +0100
committerThomas White <taw@physics.org>2018-03-12 10:17:49 +0100
commit753ceccfb4517ae0aa4445c18ae34ca52171f28d (patch)
treea2928d9de6f10813b97363ea401cc72625ed3ce2 /CMake/FindFFTW.cmake
parent95bb73d90fed58f61dddc0d1d3e8afeb9879daaa (diff)
Add CMake
Diffstat (limited to 'CMake/FindFFTW.cmake')
-rw-r--r--CMake/FindFFTW.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/CMake/FindFFTW.cmake b/CMake/FindFFTW.cmake
new file mode 100644
index 00000000..00c3401c
--- /dev/null
+++ b/CMake/FindFFTW.cmake
@@ -0,0 +1,22 @@
+# - Find FFTW
+# Find the native FFTW includes and library
+#
+# FFTW_INCLUDES - where to find fftw3.h
+# FFTW_LIBRARIES - List of libraries when using FFTW.
+# FFTW_FOUND - True if FFTW found.
+
+if (FFTW_INCLUDES)
+ # Already in cache, be silent
+ set (FFTW_FIND_QUIETLY TRUE)
+endif (FFTW_INCLUDES)
+
+find_path (FFTW_INCLUDES fftw3.h)
+
+find_library (FFTW_LIBRARIES NAMES fftw3)
+
+# handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if
+# all listed variables are TRUE
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (FFTW DEFAULT_MSG FFTW_LIBRARIES FFTW_INCLUDES)
+
+mark_as_advanced (FFTW_LIBRARIES FFTW_INCLUDES)