Merge pull request #2954 from shrit/check_blas
Check for blas and Lapack before downloading armadillo
This commit is contained in:
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user