From cfb0d277380caadf4695e943cb0b071eb8483100 Mon Sep 17 00:00:00 2001 From: akarbown Date: Thu, 10 Sep 2020 13:59:03 +0200 Subject: [PATCH] Fix for MKL symbol name clashing issue (#18855) This change enables symbol exclusion of statically linked MKL libraries to avoid the name clashing issue. --- cmake/Modules/FindMKL.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()