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
391c11ed
Commit
391c11ed
authored
Nov 14, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Plain Diff
merged
parents
9e290f65
acda88a5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
1 deletion
+36
-1
CMakeLists.txt
dlib/CMakeLists.txt
+7
-0
cmake_find_blas.txt
dlib/cmake_utils/cmake_find_blas.txt
+21
-0
config.h.in
dlib/config.h.in
+3
-0
fortran_id.h
dlib/matrix/lapack/fortran_id.h
+5
-1
No files found.
dlib/CMakeLists.txt
View file @
391c11ed
...
...
@@ -503,6 +503,13 @@ if (NOT TARGET dlib)
if
(
DLIB_USE_LAPACK
)
if
(
lapack_found
)
set
(
dlib_needed_libraries
${
dlib_needed_libraries
}
${
lapack_libraries
}
)
if
(
lapack_with_underscore
)
set
(
LAPACK_FORCE_UNDERSCORE 1
)
enable_preprocessor_switch
(
LAPACK_FORCE_UNDERSCORE
)
elseif
(
lapack_without_underscore
)
set
(
LAPACK_FORCE_NOUNDERSCORE 1
)
enable_preprocessor_switch
(
LAPACK_FORCE_NOUNDERSCORE
)
endif
()
else
()
set
(
DLIB_USE_LAPACK OFF CACHE STRING
${
DLIB_USE_LAPACK_STR
}
FORCE
)
toggle_preprocessor_switch
(
DLIB_USE_LAPACK
)
...
...
dlib/cmake_utils/cmake_find_blas.txt
View file @
391c11ed
...
...
@@ -26,6 +26,8 @@ SET(blas_found 0)
SET(lapack_found 0)
SET(found_intel_mkl 0)
SET(found_intel_mkl_headers 0)
SET(lapack_with_underscore 0)
SET(lapack_without_underscore 0)
message(STATUS "Searching for BLAS and LAPACK")
...
...
@@ -346,3 +348,22 @@ if (NOT lapack_found)
endif()
endif()
# If using lapack, determine whether to mangle functions
if (lapack_found)
include(CheckFunctionExists)
include(CheckFortranFunctionExists)
set(CMAKE_REQUIRED_LIBRARIES ${lapack_libraries})
check_function_exists("sgesv" LAPACK_FOUND_C_UNMANGLED)
check_function_exists("sgesv_" LAPACK_FOUND_C_MANGLED)
if (CMAKE_Fortran_COMPILER_LOADED)
check_fortran_function_exists("sgesv" LAPACK_FOUND_FORTRAN_UNMANGLED)
check_fortran_function_exists("sgesv_" LAPACK_FOUND_FORTRAN_MANGLED)
endif ()
if (LAPACK_FOUND_C_MANGLED OR LAPACK_FOUND_FORTRAN_MANGLED)
set(lapack_with_underscore 1)
elseif (LAPACK_FOUND_C_UNMANGLED OR LAPACK_FOUND_FORTRAN_UNMANGLED)
set(lapack_without_underscore 1)
endif ()
endif()
dlib/config.h.in
View file @
391c11ed
...
...
@@ -14,6 +14,9 @@
#cmakedefine DLIB_NO_GUI_SUPPORT
#cmakedefine DLIB_ENABLE_STACK_TRACE
#cmakedefine LAPACK_FORCE_UNDERSCORE
#cmakedefine LAPACK_FORCE_NOUNDERSCORE
// You should also consider telling dlib to link against libjpeg, libpng, libgif, fftw, CUDA,
// and a BLAS and LAPACK library. To do this you need to uncomment the following #defines.
#cmakedefine DLIB_JPEG_SUPPORT
...
...
dlib/matrix/lapack/fortran_id.h
View file @
391c11ed
...
...
@@ -18,7 +18,11 @@
// First we need to know what the conventions for linking
// C with Fortran is on this platform/toolset
#if defined(__GNUC__) || defined(__ICC) || defined(__sgi) || defined(__COMO__) || defined(__KCC)
#if defined(LAPACK_FORCE_UNDERSCORE)
#define DLIB_BIND_FORTRAN_LOWERCASE_UNDERSCORE
#elif defined(LAPACK_FORCE_NOUNDERSCORE)
#define DLIB_BIND_FORTRAN_LOWERCASE
#elif defined(__GNUC__) || defined(__ICC) || defined(__sgi) || defined(__COMO__) || defined(__KCC)
#define DLIB_BIND_FORTRAN_LOWERCASE_UNDERSCORE
#elif defined(__IBMCPP__) || defined(_MSC_VER) || defined(__BORLANDC__)
#define DLIB_BIND_FORTRAN_LOWERCASE
...
...
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