Skip to content

Commit 35d056e

Browse files
author
pfeatherstone
committed
fix blas build
1 parent 42c3904 commit 35d056e

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

dlib/CMakeLists.txt

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ if (NOT TARGET dlib)
186186
set (DLIB_LINK_WITH_SQLITE3_STR
187187
"Disable this if you don't want to link against sqlite3" )
188188
#set (DLIB_USE_FFTW_STR "Disable this if you don't want to link against fftw" )
189-
set (DLIB_USE_MKL_FFT_STR
190-
"Disable this is you don't want to use the MKL DFTI FFT implementation" )
191189
set (DLIB_ENABLE_ASSERTS_STR
192190
"Enable this if you want to turn on the DLIB_ASSERT macro" )
193191
set (DLIB_USE_FFMPEG_STR
@@ -253,7 +251,6 @@ if (NOT TARGET dlib)
253251
#option(DLIB_USE_FFTW ${DLIB_USE_FFTW_STR} ON)
254252
option(DLIB_USE_FFMPEG ${DLIB_USE_FFMPEG_STR} ON)
255253
endif()
256-
cmake_dependent_option(DLIB_USE_MKL_FFT ${DLIB_USE_MKL_FFT_STR} ON "mkl_found" OFF)
257254
cmake_dependent_option(DLIB_USE_MKL_SEQUENTIAL ${DLIB_USE_MKL_SEQUENTIAL_STR} ON "mkl_seq_found" OFF)
258255
cmake_dependent_option(DLIB_USE_MKL_WITH_TBB ${DLIB_USE_MKL_WITH_TBB_STR} ON "mkl_tbb_found" OFF)
259256
cmake_dependent_option(DLIB_USE_MKL_THREAD ${DLIB_USE_MKL_THREAD_STR} ON "mkl_thread_found" OFF)
@@ -268,7 +265,6 @@ if (NOT TARGET dlib)
268265
toggle_preprocessor_switch(DLIB_WEBP_SUPPORT)
269266
toggle_preprocessor_switch(DLIB_JXL_SUPPORT)
270267
#toggle_preprocessor_switch(DLIB_USE_FFTW)
271-
toggle_preprocessor_switch(DLIB_USE_MKL_FFT)
272268
toggle_preprocessor_switch(DLIB_USE_MKL_SEQUENTIAL)
273269
toggle_preprocessor_switch(DLIB_USE_MKL_WITH_TBB)
274270
toggle_preprocessor_switch(DLIB_USE_MKL_THREAD)
@@ -621,17 +617,22 @@ if (NOT TARGET dlib)
621617
disable_preprocessor_switch(DLIB_USE_MKL_WITH_TBB)
622618
list (APPEND dlib_needed_public_libraries ${mkl_libraries_thread})
623619
endif()
624-
elseif(DLIB_USE_BLAS)
625-
list (APPEND dlib_needed_public_libraries ${blas_libraries})
626-
elseif(DLIB_USE_LAPACK)
627-
list (APPEND dlib_needed_public_libraries ${lapack_libraries})
628-
if (lapack_with_underscore)
629-
set(LAPACK_FORCE_UNDERSCORE 1)
630-
enable_preprocessor_switch(LAPACK_FORCE_UNDERSCORE)
631-
elseif (lapack_without_underscore)
632-
set(LAPACK_FORCE_NOUNDERSCORE 1)
633-
enable_preprocessor_switch(LAPACK_FORCE_NOUNDERSCORE)
634-
endif ()
620+
else()
621+
if(DLIB_USE_BLAS)
622+
message(STATUS "Using BLAS ${blas_libraries}")
623+
list (APPEND dlib_needed_public_libraries ${blas_libraries})
624+
endif()
625+
if(DLIB_USE_LAPACK)
626+
message(STATUS "Using LAPACK ${lapack_libraries}")
627+
list (APPEND dlib_needed_public_libraries ${lapack_libraries})
628+
if (lapack_with_underscore)
629+
set(LAPACK_FORCE_UNDERSCORE 1)
630+
enable_preprocessor_switch(LAPACK_FORCE_UNDERSCORE)
631+
elseif (lapack_without_underscore)
632+
set(LAPACK_FORCE_NOUNDERSCORE 1)
633+
enable_preprocessor_switch(LAPACK_FORCE_NOUNDERSCORE)
634+
endif ()
635+
endif()
635636
endif()
636637

637638
if (DLIB_USE_CUDA)

dlib/cmake_utils/find_blas.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# mkl_tbb_found - True if the Intel MKL tbb library is available
1313
# mkl_thread_found - True if the Intel MKL thread library is available
1414
# mkl_found - True if at least one of (mkl_seq_found,mkl_tbb_found,mkl_thread_found) is true
15-
# mkl_include_dir - add to the include path to use the MKL library
15+
# mkl_include_dir - MKL include directory
1616
# mkl_libraries_sequential - MKL sequential libraries if found
1717
# mkl_libraries_tbb - MKL tbb libraries if found
1818
# mkl_libraries_thread - MKL thread libraries if found

0 commit comments

Comments
 (0)