Skip to content

Commit 18784bb

Browse files
Simply turn off SIMD checks for MSVC
1 parent 20b6ef2 commit 18784bb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ message(STATUS "Using parallel policies with ${ONEDPL_BACKEND} backend")
151151
string(TOLOWER ${ONEDPL_BACKEND} ONEDPL_BACKEND)
152152

153153
if (ONEDPL_ENABLE_SIMD)
154-
if (NOT INTEL_LLVM_COMPILER OR NOT INTEL_LLVM_COMPILER_VERSION VERSION_LESS 2021.4)
154+
# MSVC supports OpenMP 2.0 which is not sufficent for SIMD execution
155+
# TODO: check if -openmp:experimental can be used
156+
if ((NOT INTEL_LLVM_COMPILER AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
157+
OR NOT INTEL_LLVM_COMPILER_VERSION VERSION_LESS 2021.4)
155158
foreach(_simd_flag -fopenmp-simd /Qopenmp-simd -qopenmp-simd -openmp-simd)
156159
string(MAKE_C_IDENTIFIER ${_simd_flag} FLAG_DISPLAY_NAME)
157160
check_cxx_compiler_flag(${_simd_flag} ${FLAG_DISPLAY_NAME}_option)

0 commit comments

Comments
 (0)