diff --git a/cmake/Modules/FindMKL.cmake b/cmake/Modules/FindMKL.cmake index 9e7adbf37318..2e279d0e07c9 100644 --- a/cmake/Modules/FindMKL.cmake +++ b/cmake/Modules/FindMKL.cmake @@ -148,7 +148,7 @@ set(INTEL_ROOT "/opt/intel" CACHE PATH "Folder contains intel libs") endif() if(MKL_USE_STATIC_LIBS AND UNIX) - set(MKL_LIBRARIES -Wl,--start-group "${MKL_LIBRARIES}" -Wl,--end-group) + set(MKL_LIBRARIES -Wl,--exclude-libs,ALL -Wl,--start-group "${MKL_LIBRARIES}" -Wl,--end-group) endif()