From 6691bc66b46869ce4cb4bb9b8a22f0b5b547f7d0 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sat, 27 Oct 2012 18:01:17 +0000
Subject: [PATCH] test for generic blas on linux

---
 CMakeLists.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd7ea8784e..c0bfad1385 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -260,6 +260,14 @@ if(ENABLE_BLAS_LAPACK)
       if(LAPACK_LIBRARIES)
         set_config_option(HAVE_BLAS "Blas(ATLAS)")
         set_config_option(HAVE_LAPACK "Lapack(ATLAS)")
+      else(LAPACK_LIBRARIES)
+        # try with generic names
+        set(GENERIC_LIBS_REQUIRED lapack blas pthread)
+        find_all_libraries(LAPACK_LIBRARIES GENERIC_LIBS_REQUIRED "" "")
+        if(LAPACK_LIBRARIES)
+          set_config_option(HAVE_BLAS "Blas(Generic)")
+          set_config_option(HAVE_LAPACK "Lapack(Generic)")
+        endif(LAPACK_LIBRARIES)
       endif(LAPACK_LIBRARIES)
     endif(LAPACK_LIBRARIES)
   elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
-- 
GitLab