diff options
Diffstat (limited to 'Modules/FindOpenMP.cmake')
-rw-r--r-- | Modules/FindOpenMP.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index a1ffc25..52330a4 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -113,7 +113,12 @@ function(_OPENMP_FLAG_CANDIDATES LANG) else() set(OMP_FLAG_Intel "-qopenmp") endif() - set(OMP_FLAG_IntelLLVM "-fiopenmp") + if(CMAKE_${LANG}_COMPILER_ID STREQUAL "IntelLLVM" AND + "x${CMAKE_${LANG}_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC") + set(OMP_FLAG_IntelLLVM "-Qiopenmp") + else() + set(OMP_FLAG_IntelLLVM "-fiopenmp") + endif() set(OMP_FLAG_MSVC "-openmp") set(OMP_FLAG_PathScale "-openmp") set(OMP_FLAG_NAG "-openmp") |