diff options
author | William R. Dieter <william.r.dieter@intel.com> | 2022-06-18 05:26:59 (GMT) |
---|---|---|
committer | William R. Dieter <william.r.dieter@intel.com> | 2022-08-01 23:34:49 (GMT) |
commit | adbffd204dc48566be9287a30a8e1d99878e5d23 (patch) | |
tree | efe65673756c00026307e7513922bc4f2f5cfc85 /Modules | |
parent | 3640842df23de476506d1529caf1736052dbcb38 (diff) | |
download | CMake-adbffd204dc48566be9287a30a8e1d99878e5d23.zip CMake-adbffd204dc48566be9287a30a8e1d99878e5d23.tar.gz CMake-adbffd204dc48566be9287a30a8e1d99878e5d23.tar.bz2 |
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>
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindOpenMP.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index 0590a28..3e10e16 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -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() |