Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
f9828cd0
Commit
f9828cd0
authored
Jan 19, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: fix MKL detection in case of unsupported versions
CMake should not fail.
parent
a22f03e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
OpenCVFindLAPACK.cmake
cmake/OpenCVFindLAPACK.cmake
+2
-1
OpenCVFindMKL.cmake
cmake/OpenCVFindMKL.cmake
+11
-10
No files found.
cmake/OpenCVFindLAPACK.cmake
View file @
f9828cd0
...
...
@@ -133,6 +133,7 @@ if(WITH_LAPACK)
set
(
LAPACK_IMPL
"LAPACK/Apple"
)
ocv_lapack_check
()
else
()
unset
(
LAPACK_LIBRARIES
)
unset
(
LAPACK_LIBRARIES CACHE
)
endif
()
endif
()
...
...
@@ -147,7 +148,7 @@ if(WITH_LAPACK)
ocv_lapack_check
()
endif
()
if
(
NOT HAVE_LAPACK AND LAPACK_LIBRARIES
)
if
(
NOT HAVE_LAPACK AND LAPACK_LIBRARIES
AND LAPACK_CBLAS_H AND LAPACK_LAPACKE_H
)
ocv_lapack_check
()
endif
()
...
...
cmake/OpenCVFindMKL.cmake
View file @
f9828cd0
...
...
@@ -20,10 +20,8 @@ macro (mkl_find_lib VAR NAME DIRS)
endmacro
()
macro
(
mkl_fail
)
set
(
HAVE_MKL OFF
CACHE BOOL
"True if MKL found"
)
set
(
HAVE_MKL OFF
)
set
(
MKL_ROOT_DIR
${
MKL_ROOT_DIR
}
CACHE PATH
"Path to MKL directory"
)
unset
(
MKL_INCLUDE_DIRS CACHE
)
unset
(
MKL_LIBRARIES CACHE
)
return
()
endmacro
()
...
...
@@ -64,11 +62,16 @@ if(NOT MKL_ROOT_DIR OR NOT EXISTS ${MKL_ROOT_DIR}/include/mkl.h)
find_path
(
MKL_ROOT_DIR include/mkl.h PATHS
${
mkl_root_paths
}
)
endif
()
if
(
NOT MKL_ROOT_DIR
)
set
(
MKL_INCLUDE_DIRS
${
MKL_ROOT_DIR
}
/include CACHE PATH
"Path to MKL include directory"
)
if
(
NOT MKL_ROOT_DIR
OR NOT EXISTS
"
${
MKL_ROOT_DIR
}
"
OR NOT EXISTS
"
${
MKL_INCLUDE_DIRS
}
"
OR NOT EXISTS
"
${
MKL_INCLUDE_DIRS
}
/mkl_version.h"
)
mkl_fail
()
endif
()
set
(
MKL_INCLUDE_DIRS
${
MKL_ROOT_DIR
}
/include
)
get_mkl_version
(
${
MKL_INCLUDE_DIRS
}
/mkl_version.h
)
#determine arch
...
...
@@ -124,13 +127,11 @@ foreach(lib ${mkl_lib_list})
endforeach
()
message
(
STATUS
"Found MKL
${
MKL_VERSION_STR
}
at:
${
MKL_ROOT_DIR
}
"
)
set
(
HAVE_MKL ON
CACHE BOOL
"True if MKL found"
)
set
(
HAVE_MKL ON
)
set
(
MKL_ROOT_DIR
${
MKL_ROOT_DIR
}
CACHE PATH
"Path to MKL directory"
)
set
(
MKL_INCLUDE_DIRS
${
MKL_INCLUDE_DIRS
}
CACHE PATH
"Path to MKL include directory"
)
if
(
NOT UNIX
)
set
(
MKL_LIBRARIES
${
MKL_LIBRARIES
}
CACHE FILEPATH
"MKL libarries"
)
else
()
set
(
MKL_LIBRARIES
${
MKL_LIBRARIES
}
CACHE STRING
"MKL libarries"
)
if
(
UNIX AND NOT MKL_LIBRARIES_DONT_HACK
)
#it's ugly but helps to avoid cyclic lib problem
set
(
MKL_LIBRARIES
${
MKL_LIBRARIES
}
${
MKL_LIBRARIES
}
${
MKL_LIBRARIES
}
"-lpthread"
"-lm"
"-ldl"
)
set
(
MKL_LIBRARIES
${
MKL_LIBRARIES
}
CACHE STRING
"MKL libarries"
)
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