aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/btl/cmake/FindGOTO2.cmake
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2011-01-31 10:45:03 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2011-01-31 10:45:03 +0100
commit9a73bfeb85fa842d962cfd342df85601a5b0e7fa (patch)
tree34666c35c99e437bf442058afc6daa5e39ee62ba /bench/btl/cmake/FindGOTO2.cmake
parent6e67d15795272cec06f752d44511bab5de98707c (diff)
add GOTO2 and clean a bit the cmake macros
Diffstat (limited to 'bench/btl/cmake/FindGOTO2.cmake')
-rw-r--r--bench/btl/cmake/FindGOTO2.cmake25
1 files changed, 25 insertions, 0 deletions
diff --git a/bench/btl/cmake/FindGOTO2.cmake b/bench/btl/cmake/FindGOTO2.cmake
new file mode 100644
index 000000000..baa68d213
--- /dev/null
+++ b/bench/btl/cmake/FindGOTO2.cmake
@@ -0,0 +1,25 @@
+
+if (GOTO2_LIBRARIES)
+ set(GOTO2_FIND_QUIETLY TRUE)
+endif (GOTO2_LIBRARIES)
+#
+# find_path(GOTO_INCLUDES
+# NAMES
+# cblas.h
+# PATHS
+# $ENV{GOTODIR}/include
+# ${INCLUDE_INSTALL_DIR}
+# )
+
+find_file(GOTO2_LIBRARIES libgoto2.so PATHS /usr/lib $ENV{GOTO2DIR} ${LIB_INSTALL_DIR})
+find_library(GOTO2_LIBRARIES goto2 PATHS $ENV{GOTO2DIR} ${LIB_INSTALL_DIR})
+
+if(GOTO2_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX)
+ set(GOTO2_LIBRARIES ${GOTO2_LIBRARIES} "-lpthread -lgfortran")
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GOTO2 DEFAULT_MSG
+ GOTO2_LIBRARIES)
+
+mark_as_advanced(GOTO2_LIBRARIES)