summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-06-02 13:14:10 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-06-02 13:14:20 (GMT)
commita0ce31de1830045ab5fef45e0d69bae5a915f5d7 (patch)
treed9b84fb5bd2bea3ce64298b57f068add301b053a
parent17a43ee192116f82b9dae494333f5e14b4553f87 (diff)
parent56ff12501f908220953d7d80408732144ffa17d6 (diff)
downloadCMake-a0ce31de1830045ab5fef45e0d69bae5a915f5d7.zip
CMake-a0ce31de1830045ab5fef45e0d69bae5a915f5d7.tar.gz
CMake-a0ce31de1830045ab5fef45e0d69bae5a915f5d7.tar.bz2
Merge topic 'FindOpenMP-shell-flags'
56ff12501f FindOpenMP: Keep flags together in imported target usage requirements Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8529
-rw-r--r--Modules/FindOpenMP.cmake6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index 68be2d6..cd912c3 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -600,15 +600,13 @@ foreach(LANG IN LISTS OpenMP_FINDLIST)
add_library(OpenMP::OpenMP_${LANG} INTERFACE IMPORTED)
endif()
if(OpenMP_${LANG}_FLAGS)
- 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}>")
+ INTERFACE_COMPILE_OPTIONS "$<$<COMPILE_LANGUAGE:${LANG}>:SHELL:${OpenMP_${LANG}_FLAGS}>")
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}")
+ INTERFACE_LINK_OPTIONS "SHELL:${OpenMP_${LANG}_FLAGS}")
endif()
- unset(_OpenMP_${LANG}_OPTIONS)
endif()
if(OpenMP_${LANG}_INCLUDE_DIRS)
set_property(TARGET OpenMP::OpenMP_${LANG} PROPERTY