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

FIX: Trying to fix CI...

parent 7826f8f5
No related branches found
No related tags found
No related merge requests found
......@@ -153,36 +153,28 @@ if(NOT TURTLE_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD)
include(DownloadTurtle)
endif()
message("Checking Armadillo dependencies")
find_package(LAPACK)
find_package(BLAS)
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("Nor LAPACK nor BLAS were found - OpenBLAS will be downloaded and built.")
include(DownloadOpenBLAS)
if(NOT WIN32)
message("Checking Armadillo dependencies")
find_package(LAPACK)
find_package(BLAS)
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("Nor LAPACK nor BLAS were found - OpenBLAS will be downloaded and built.")
include(DownloadOpenBLAS)
endif()
endif()
set(ARMA_LIBS "${OpenBLAS_LIBRARIES}")
endif()
set(ARMA_LIBS "${OpenBLAS_LIBRARIES}")
# WARNING: Armadillo is added as a subdirectory, as it's also being compiled by CMake!
find_package(Armadillo)
if(NOT ARMADILLO_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD)
message("Armadillo will be downloaded and compiled locally in 'external_dependencies folder.")
include(DownloadArmadillo)
# if(NOT LAPACK_FOUND AND NOT BLAS_FOUND)
# target_link_libraries(
# armadillo
#
# PUBLIC
# openblas
# )
# endif()
endif()
#---------------------------------------------------#
......
......@@ -19,19 +19,19 @@ FIND_PATH(
include/x86_64-linux-gnu
)
IF(${OpenBLAS_INCLUDE_DIR} MATCHES "^.*external_dependencies.*$")
# If OpenBLAS is downloaded locally, the library will be compiled during build-time
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
OpenBLAS
"OpenBLAS was NOT found!"
OpenBLAS_INCLUDE_DIR)
if(OpenBLAS_FOUND)
message(STATUS "OpenBLAS is downloaded locally: ${OpenBLAS_INCLUDE_DIR}")
endif()
else()
#IF(${OpenBLAS_INCLUDE_DIR} MATCHES "^.*external_dependencies.*$")
# # If OpenBLAS is downloaded locally, the library will be compiled during build-time
# INCLUDE(FindPackageHandleStandardArgs)
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(
# OpenBLAS
# "OpenBLAS was NOT found!"
# OpenBLAS_INCLUDE_DIR)
#
# if(OpenBLAS_FOUND)
# message(STATUS "OpenBLAS is downloaded locally: ${OpenBLAS_INCLUDE_DIR}")
# endif()
#
#else()
FIND_LIBRARY(
OpenBLAS_LIBRARIES
......@@ -64,16 +64,11 @@ else()
OpenBLAS_LIBRARIES
)
if(OpenBLAS_FOUND)
MESSAGE(STATUS "Found OpenBLAS libraries: ${OpenBLAS_LIBRARIES}")
MESSAGE(STATUS "Found OpenBLAS include: ${OpenBLAS_INCLUDE_DIR}")
endif()
endif()
#endif()
#IF (OpenBLAS_LIBRARIES)
## MESSAGE(STATUS "Found OpenBLAS libraries: ${OpenBLAS_LIBRARIES}")
# MESSAGE(STATUS "Found OpenBLAS include: ${OpenBLAS_INCLUDE_DIR}")
#ELSE()
# MESSAGE("Could not find OpenBLAS")
#ENDIF()
IF (OpenBLAS_LIBRARIES)
MESSAGE(STATUS "Found OpenBLAS libraries: ${OpenBLAS_LIBRARIES}")
MESSAGE(STATUS "Found OpenBLAS include: ${OpenBLAS_INCLUDE_DIR}")
ELSE()
MESSAGE("Could not find OpenBLAS")
ENDIF()
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