mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 03:48:02 +08:00
FindOpenMP: Use -Qiopenmp instead of -fiopenmp for IntelLLVM on Windows
The Windows driver does not like the `-f` form of this option. Note that we prefer `-Qiopenmp/-fiopenmp` over `-Qopenmp/-fopenmp` in order to generate LLVM IR with parallelization information, which the backend uses to generate parallelized code. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
This commit is contained in:

committed by
Brad King

parent
dfdea7d9e3
commit
6fd014a4b6
@@ -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")
|
||||
|
Reference in New Issue
Block a user