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:
William R. Dieter authored and Brad King committed 2021-03-15 14:43:23 -04:00
1 parent dfdea7d9e3
commit 6fd014a4b6
1 file changed
+6 -1
+6 -1
View File
@@ -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")