From 7d1ed84ceaa1c3467c091de302c778b5989bd03c Mon Sep 17 00:00:00 2001 From: Christian Pfeiffer Date: Tue, 12 Dec 2017 14:43:08 +0100 Subject: IRSL: Skip libgfxoffload if no Intel C++ is used `libgfxoffload` is only used and installed by the Intel C/C++ compilers and will be unavailable if only Intel Fortran has been installed. Fixes: #17550 --- Modules/InstallRequiredSystemLibraries.cmake | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 38e0861..c886aef 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -600,11 +600,14 @@ if(_IRSL_HAVE_Intel) if(_Intel_compiler_ver VERSION_LESS 18) list(APPEND __install_dirs "${_Intel_redistdir}/irml" "${_Intel_redistdir}/irml_c") endif() - foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libgfxoffload.dll libioffload_host.dll libirngmd.dll + foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libioffload_host.dll libirngmd.dll libmmd.dll libmmdd.dll libmpx.dll liboffload.dll svml_dispmd.dll) list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") endforeach() + if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel) + list(APPEND __install_libs "${_Intel_redistdir}/libgfxoffload.dll") + endif() if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) foreach(__Intel_lib IN ITEMS ifdlg100.dll libicaf.dll libifcoremd.dll libifcoremdd.dll libifcorert.dll libifcorertd.dll libifportmd.dll) @@ -637,10 +640,10 @@ if(_IRSL_HAVE_Intel) endforeach() endif() if(_Intel_compiler_ver VERSION_GREATER_EQUAL 15) - foreach(__Intel_lib IN ITEMS libgfxoffload.so libistrconv.so) - - list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") - endforeach() + list(APPEND __install_libs "${_Intel_redistdir}/libistrconv.so") + if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel) + list(APPEND __install_libs "${_Intel_redistdir}/libgfxoffload.so") + endif() endif() if(_Intel_compiler_ver VERSION_GREATER_EQUAL 16) foreach(__Intel_lib IN ITEMS libioffload_host.so libioffload_host.so.5 libioffload_target.so libioffload_target.so.5 libmpx.so offload_main) -- cgit v0.12