diff --git a/CMake/ConfigureCrossCompile.cmake b/CMake/ConfigureCrossCompile.cmake index 75e28bc453..ba78707ec3 100644 --- a/CMake/ConfigureCrossCompile.cmake +++ b/CMake/ConfigureCrossCompile.cmake @@ -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() diff --git a/CMakeLists.txt b/CMakeLists.txt index 71b5c0d8d5..29561d6fca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/README.md b/README.md index f7000edef0..4731b85c1e 100644 --- a/README.md +++ b/README.md @@ -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