Skip to content
Snippets Groups Projects
Commit 5e4a38f4 authored by Martin Beseda's avatar Martin Beseda
Browse files

FIX: ARAM_LIBS is now set to OpenBLAS_LIBRARIES.

parent bac2d19c
No related branches found
No related tags found
No related merge requests found
......@@ -89,14 +89,18 @@ message("Build will be performed on ${N_CORES} cores.")
#---------------#
# Set variables #
#---------------#
set(ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")
set(LROOT_DIR ${CMAKE_CURRENT_LIST_DIR})
set(SRC_DIR ${CMAKE_CURRENT_LIST_DIR}/src)
set(PROJECT_BINARY_DIR ${CMAKE_CURRENT_LIST_DIR}/build)
set(ROOT_DIR ${CMAKE_CURRENT_LIST_DIR})
set(SRC_DIR ${ROOT_DIR}/src)
set(PROJECT_BINARY_DIR ${ROOT_DIR}/build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
#---------------------------------------------------#
# Add subdirectory with source codes to be compiled #
#---------------------------------------------------#
add_subdirectory(${SRC_DIR} ${PROJECT_BINARY_DIR})
#----------------------------------------#
# Set prefixes and suffixes of libraries #
#----------------------------------------#
......@@ -114,7 +118,6 @@ endif()
#-------------------------#
# Find external libraries #
#-------------------------#
message("Looking for external libraries...")
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -157,12 +160,17 @@ endif()
message("Checking Armadillo dependencies")
find_package(LAPACK)
find_package(BLAS)
find_package(OpenBLAS)
if(NOT LAPACK_FOUND AND NOT BLAS_FOUND AND NOT OpenBLAS_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD)
# Download and build OpenBLAS locally
message("LAPACK nor BLAS were found - OpenBLAS will be downloaded and built.")
include(DownloadOpenBLAS)
set(ARMA_LIBS "")
if(NOT LAPACK_FOUND AND NOT BLAS_FOUND)
find_package(OpenBLAS)
if(NOT OpenBLAS_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD)
# Download and build OpenBLAS locally
message("LAPACK nor BLAS were found - OpenBLAS will be downloaded and built.")
include(DownloadOpenBLAS)
endif()
endif()
set(ARMA_LIBS "${OpenBLAS_LIBRARIES}")
find_package(Armadillo)
if(NOT ARMADILLO_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD)
......@@ -170,15 +178,4 @@ if(NOT ARMADILLO_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD)
include(DownloadArmadillo)
endif()
#----------------------------------------#
# Dependencies for the lib4neuro library #
#----------------------------------------#
message("Running CMake in: ${SRC_DIR} ${PROJECT_BINARY_DIR}")
#
#if("${BUILD_LIB}" STREQUAL "no")
#
# link_directories(${LIB4NEURO_DIR})
#
#endif()
add_subdirectory(${SRC_DIR} ${PROJECT_BINARY_DIR})
......@@ -19,7 +19,9 @@ FIND_PATH(
include/x86_64-linux-gnu
)
FIND_LIBRARY(OpenBLAS_LIBRARIES
FIND_LIBRARY(
OpenBLAS_LIBRARIES
NAMES
${LIB_PREFIX}openblas.${LIB_SUFFIX}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment