Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
faf8676a
Commit
faf8676a
authored
Oct 27, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
e8d74b30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
27 deletions
+16
-27
cmake_find_blas.txt
dlib/cmake_utils/cmake_find_blas.txt
+16
-27
No files found.
dlib/cmake_utils/cmake_find_blas.txt
View file @
faf8676a
...
...
@@ -27,6 +27,7 @@ SET(lapack_found 0)
SET(found_intel_mkl 0)
SET(found_intel_mkl_headers 0)
message(STATUS "Searching for BLAS and LAPACK")
if (UNIX OR MINGW)
message(STATUS "Searching for BLAS and LAPACK")
...
...
@@ -324,36 +325,24 @@ elseif(WIN32 AND NOT MINGW)
endif()
if (NOT blas_found)
find_package(blas)
if (${BLAS_FOUND})
set(blas_libraries ${BLAS_LIBRARIES})
set(blas_found 1)
set(CMAKE_REQUIRED_LIBRARIES ${blas_libraries})
# If you compiled OpenBLAS with LAPACK in it then it should have the
# sgetrf_single function in it. So if we find that function in
# OpenBLAS then just use OpenBLAS's LAPACK.
CHECK_FUNCTION_EXISTS(sgetrf_single OPENBLAS_HAS_LAPACK)
if (OPENBLAS_HAS_LAPACK)
message(STATUS "Using OpenBLAS's built in LAPACK")
# set(lapack_libraries gfortran)
set(lapack_found 1)
endif()
endif()
endif()
if (NOT lapack_found)
find_package(lapack)
if (${LAPACK_FOUND})
set(lapack_libraries ${LAPACK_LIBRARIES})
set(lapack_found 1)
message(STATUS "Found LAPACK library")
endif()
endif()
endif()
# When all else fails use CMake's built in functions to find BLAS and LAPACK
if (NOT blas_found)
find_package(BLAS)
if (${BLAS_FOUND})
set(blas_libraries ${BLAS_LIBRARIES})
set(blas_found 1)
endif()
endif()
if (NOT lapack_found)
find_package(LAPACK)
if (${LAPACK_FOUND})
set(lapack_libraries ${LAPACK_LIBRARIES})
set(lapack_found 1)
endif()
endif()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment