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
e1df1968
Commit
e1df1968
authored
Apr 14, 2019
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include the Intel MKL's iomp dll in the output folder to reduce confusino for windows users.
parent
ccd8b64f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
CMakeLists.txt
dlib/CMakeLists.txt
+21
-0
find_blas.cmake
dlib/cmake_utils/find_blas.cmake
+20
-0
No files found.
dlib/CMakeLists.txt
View file @
e1df1968
...
...
@@ -9,6 +9,9 @@ cmake_minimum_required(VERSION 2.8.12)
if
(
POLICY CMP0048
)
cmake_policy
(
SET CMP0048 NEW
)
endif
()
if
(
POLICY CMP0077
)
cmake_policy
(
SET CMP0077 NEW
)
endif
()
project
(
dlib
)
...
...
@@ -954,4 +957,22 @@ if (COMMAND pybind11_add_module)
set_target_properties
(
dlib PROPERTIES CUDA_VISIBILITY_PRESET
"hidden"
)
endif
()
if
(
WIN32 AND mkl_iomp_dll
)
# If we are using the Intel MKL on windows then try and copy the iomp dll
# file to the output folder. We do this since a very large number of
# windows users don't understand that they need to add the Intel MKL's
# folders to their PATH to use the Intel MKL. They then complain on the
# dlib forums. Copying the Intel MKL dlls to the output directory removes
# the need to add the Intel MKL to the PATH.
if
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
)
add_custom_command
(
TARGET dlib POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E copy
"
${
mkl_iomp_dll
}
"
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
)
else
()
add_custom_command
(
TARGET dlib POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E copy
"
${
mkl_iomp_dll
}
"
${
CMAKE_BINARY_DIR
}
/$<CONFIG>
)
endif
()
endif
()
add_library
(
dlib::dlib ALIAS dlib
)
dlib/cmake_utils/find_blas.cmake
View file @
e1df1968
...
...
@@ -302,6 +302,7 @@ elseif(WIN32 AND NOT MINGW)
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_*/windows/compiler/lib/intel64"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/lib/intel64"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/tbb/lib/intel64/vc14"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/tbb/lib/intel64/vc_mt"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/compiler/lib/intel64"
"C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64"
"C:/Program Files (x86)/Intel/Composer XE/tbb/lib/intel64/vc14"
...
...
@@ -310,6 +311,9 @@ elseif(WIN32 AND NOT MINGW)
"C:/Program Files/Intel/Composer XE/tbb/lib/intel64/vc14"
"C:/Program Files/Intel/Composer XE/compiler/lib/intel64"
)
set
(
mkl_redist_path
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/redist/intel64/compiler"
)
find_library
(
mkl_intel mkl_intel_lp64
${
mkl_search_path
}
)
else
()
set
(
mkl_search_path
...
...
@@ -318,6 +322,7 @@ elseif(WIN32 AND NOT MINGW)
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_*/windows/compiler/lib/ia32"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/lib/ia32"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/tbb/lib/ia32/vc14"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/tbb/lib/ia32/vc_mt"
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/compiler/lib/ia32"
"C:/Program Files (x86)/Intel/Composer XE/mkl/lib/ia32"
"C:/Program Files (x86)/Intel/Composer XE/tbb/lib/ia32/vc14"
...
...
@@ -326,6 +331,9 @@ elseif(WIN32 AND NOT MINGW)
"C:/Program Files/Intel/Composer XE/tbb/lib/ia32/vc14"
"C:/Program Files/Intel/Composer XE/compiler/lib/ia32"
)
set
(
mkl_redist_path
"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/redist/ia32/compiler"
)
find_library
(
mkl_intel mkl_intel_c
${
mkl_search_path
}
)
endif
()
...
...
@@ -363,6 +371,18 @@ elseif(WIN32 AND NOT MINGW)
find_library
(
mkl_iomp libiomp5md
${
mkl_search_path
}
)
mark_as_advanced
(
mkl_thread mkl_iomp
)
list
(
APPEND mkl_libs
${
mkl_thread
}
${
mkl_iomp
}
)
if
(
mkl_iomp
)
# See if we can find the dll that goes with this, so we can copy it to
# the output folder, since a very large number of windows users don't
# understand that they need to add the Intel MKL's folders to their
# PATH to use the Intel MKL. They then complain on the dlib forums.
# Copying the Intel MKL dlls to the output directory removes the need
# to add the Intel MKL to the PATH.
find_file
(
mkl_iomp_dll
"libiomp5md.dll"
${
mkl_redist_path
}
)
if
(
mkl_iomp_dll
)
message
(
STATUS
"FOUND libiomp5md.dll:
${
mkl_iomp_dll
}
"
)
endif
()
endif
()
endif
()
# If we found the MKL
...
...
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