Skip to content

Commit

Permalink
Suppress Intel Compiler debug iterator vectorization warning in test_…
Browse files Browse the repository at this point in the history
…openmp.cpp (#1630)
  • Loading branch information
dnmokhov authored Feb 6, 2025
1 parent fa5ed8e commit b92627b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,12 @@ if (TARGET TBB::tbb)

set_target_properties(test_openmp PROPERTIES COMPILE_FLAGS ${TBB_OPENMP_FLAG})

# Intel LLVM compiler triggers a warning when using OpenMP in debug mode on Windows.
# The only way not to trigger it seems to be explicitly disabling it from the command line.
if (WIN32 AND (CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM) AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 2025.0))
target_compile_options(test_openmp PRIVATE $<$<CONFIG:DEBUG>:-Wno-debug-option-simd>)
endif()

if (NOT TBB_OPENMP_NO_LINK_FLAG)
set_target_properties(test_openmp PROPERTIES LINK_FLAGS ${TBB_OPENMP_FLAG})
endif()
Expand Down

0 comments on commit b92627b

Please sign in to comment.