mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 19:30:13 -06:00
Propagate OpenMP compiler flags to linker for IntelLLVM
When compiling for offload and in general when OpenMP is enabled while compiling, it should also be enabled when linking. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
This commit is contained in:
@@ -599,7 +599,8 @@ foreach(LANG IN LISTS OpenMP_FINDLIST)
|
||||
separate_arguments(_OpenMP_${LANG}_OPTIONS NATIVE_COMMAND "${OpenMP_${LANG}_FLAGS}")
|
||||
set_property(TARGET OpenMP::OpenMP_${LANG} PROPERTY
|
||||
INTERFACE_COMPILE_OPTIONS "$<$<COMPILE_LANGUAGE:${LANG}>:${_OpenMP_${LANG}_OPTIONS}>")
|
||||
if(CMAKE_${LANG}_COMPILER_ID STREQUAL "Fujitsu")
|
||||
if(CMAKE_${LANG}_COMPILER_ID STREQUAL "Fujitsu"
|
||||
OR ${CMAKE_${LANG}_COMPILER_ID} STREQUAL "IntelLLVM")
|
||||
set_property(TARGET OpenMP::OpenMP_${LANG} PROPERTY
|
||||
INTERFACE_LINK_OPTIONS "${OpenMP_${LANG}_FLAGS}")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user