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

FIX: Removed unneccessary parts of code in FindOpenBLAS.cmake

parent 70ed77e4
No related branches found
No related tags found
No related merge requests found
message("FindOpenBLAS starting...") message("FindOpenBLAS starting...")
set(OpenBLAS_ROOT external_dependencies/OpenBLAS)
FIND_PATH( FIND_PATH(
OpenBLAS_INCLUDE_DIR OpenBLAS_INCLUDE_DIR
...@@ -20,55 +18,39 @@ FIND_PATH( ...@@ -20,55 +18,39 @@ FIND_PATH(
include/OpenBLAS include/OpenBLAS
) )
#IF(${OpenBLAS_INCLUDE_DIR} MATCHES "^.*external_dependencies.*$") FIND_LIBRARY(
# # If OpenBLAS is downloaded locally, the library will be compiled during build-time OpenBLAS_LIBRARIES
# 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
NAMES
${LIB_PREFIX}openblas.${LIB_SUFFIX}
HINTS NAMES
${OpenBLAS_LIBRARY_DIRECTORY} ${LIB_PREFIX}openblas.${LIB_SUFFIX}
$ENV{OpenBLAS_LIBRARY_DIRECTORY}
${ROOT_DIR}/external_dependencies/OpenBLAS
/usr
PATH_SUFFIXES HINTS
lib ${OpenBLAS_LIBRARY_DIRECTORY}
lib/x86_64-linux-gnu $ENV{OpenBLAS_LIBRARY_DIRECTORY}
local ${ROOT_DIR}/external_dependencies/OpenBLAS
include/OpenBLAS/lib /usr
)
# Set OpenBLAS_Found PATH_SUFFIXES
INCLUDE(FindPackageHandleStandardArgs) lib
FIND_PACKAGE_HANDLE_STANDARD_ARGS( lib/x86_64-linux-gnu
OpenBLAS local
include/OpenBLAS/lib
)
FAIL_MESSAGE # Set OpenBLAS_Found
"OpenBLAS was NOT found!" INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
OpenBLAS
REQUIRED_VARS FAIL_MESSAGE
OpenBLAS_INCLUDE_DIR "OpenBLAS was NOT found!"
OpenBLAS_LIBRARIES
)
#endif() REQUIRED_VARS
OpenBLAS_INCLUDE_DIR
OpenBLAS_LIBRARIES
)
IF (OpenBLAS_LIBRARIES) IF (OpenBLAS_FOUND)
MESSAGE(STATUS "Found OpenBLAS libraries: ${OpenBLAS_LIBRARIES}") MESSAGE(STATUS "Found OpenBLAS libraries: ${OpenBLAS_LIBRARIES}")
MESSAGE(STATUS "Found OpenBLAS include: ${OpenBLAS_INCLUDE_DIR}") MESSAGE(STATUS "Found OpenBLAS include: ${OpenBLAS_INCLUDE_DIR}")
ELSE() ELSE()
......
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