aboutsummaryrefslogtreecommitdiff
path: root/CMake/FindCBF.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/FindCBF.cmake
parent95bb73d90fed58f61dddc0d1d3e8afeb9879daaa (diff)
Add CMake
Diffstat (limited to 'CMake/FindCBF.cmake')
-rw-r--r--CMake/FindCBF.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/CMake/FindCBF.cmake b/CMake/FindCBF.cmake
new file mode 100644
index 00000000..390c9c2e
--- /dev/null
+++ b/CMake/FindCBF.cmake
@@ -0,0 +1,22 @@
+# - Find CBF
+# Find the native CBF includes and library
+#
+# CBF_INCLUDES - where to find fftw3.h
+# CBF_LIBRARIES - List of libraries when using CBF.
+# CBF_FOUND - True if CBF found.
+
+if (CBF_INCLUDES)
+ # Already in cache, be silent
+ set (CBF_FIND_QUIETLY TRUE)
+endif (CBF_INCLUDES)
+
+find_path (CBF_INCLUDES cbf.h PATH_SUFFIXES libcbf cbf)
+
+find_library (CBF_LIBRARIES NAMES cbf)
+
+# handle the QUIETLY and REQUIRED arguments and set CBF_FOUND to TRUE if
+# all listed variables are TRUE
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (CBF DEFAULT_MSG CBF_LIBRARIES CBF_INCLUDES)
+
+mark_as_advanced (CBF_LIBRARIES CBF_INCLUDES)