Merge pull request #2954 from shrit/check_blas

Check for blas and Lapack before downloading armadillo
This commit is contained in:
Ryan Curtin
2021-06-28 17:20:22 -04:00
committed by GitHub
3 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ macro(search_openblas version)
endif()
file(GLOB OPENBLAS_LIBRARIES "${CMAKE_BINARY_DIR}/deps/OpenBLAS-${version}/libopenblas.a")
set(BLAS_openblas_LIBRARY ${OPENBLAS_LIBRARIES})
set(LAPACK_openblas_LIBRARY ${OPENBLAS_LIBRARIES})
set(LAPACK_openblas_LIBRARY ${OPENBLAS_LIBRARIES})
set(BLA_VENDOR OpenBLAS)
set(BLAS_FOUND ON)
endif()
+8 -1
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3.2)
cmake_minimum_required(VERSION 3.6)
project(mlpack C CXX)
include(CMake/cotire.cmake)
@@ -283,6 +283,13 @@ if (DISABLE_DOWNLOADS)
else()
find_package(Armadillo "${ARMADILLO_VERSION}")
if (NOT ARMADILLO_FOUND)
if (NOT CMAKE_CROSSCOMPILING)
find_package(BLAS QUIET)
find_package(LAPACK QUIET)
if (NOT BLAS_FOUND AND NOT LAPACK_FOUND)
message(FATAL_ERROR "Can not find BLAS or LAPACK! These are required for Armadillo. Please install one of them---or install Armadillo---before installing mlpack.")
endif()
endif()
get_deps(http://files.mlpack.org/armadillo-10.3.0.tar.gz armadillo armadillo-10.3.0.tar.gz)
set(ARMADILLO_INCLUDE_DIR ${GENERIC_INCLUDE_DIR})
find_package(Armadillo REQUIRED)
+1 -1
View File
@@ -101,7 +101,7 @@ mlpack has the following dependencies:
Armadillo >= 8.400.0
Boost (math_c99, spirit) >= 1.58.0
CMake >= 3.2.2
CMake >= 3.6
ensmallen >= 2.10.0
cereal >= 1.1.2