Skip to content

Commit b92627b

Browse files
authored
Suppress Intel Compiler debug iterator vectorization warning in test_openmp.cpp (#1630)
1 parent fa5ed8e commit b92627b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,12 @@ if (TARGET TBB::tbb)
535535

536536
set_target_properties(test_openmp PROPERTIES COMPILE_FLAGS ${TBB_OPENMP_FLAG})
537537

538+
# Intel LLVM compiler triggers a warning when using OpenMP in debug mode on Windows.
539+
# The only way not to trigger it seems to be explicitly disabling it from the command line.
540+
if (WIN32 AND (CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM) AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 2025.0))
541+
target_compile_options(test_openmp PRIVATE $<$<CONFIG:DEBUG>:-Wno-debug-option-simd>)
542+
endif()
543+
538544
if (NOT TBB_OPENMP_NO_LINK_FLAG)
539545
set_target_properties(test_openmp PROPERTIES LINK_FLAGS ${TBB_OPENMP_FLAG})
540546
endif()

0 commit comments

Comments
 (0)