Skip to content

Commit 041502e

Browse files
committed
build: eliminate ICC warnings
1 parent d206e84 commit 041502e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmake/OpenCVCompilerOptions.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,4 +368,10 @@ if(MSVC)
368368
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4589") # Constructor of abstract class ... ignores initializer for virtual base class 'cv::Algorithm'
369369
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4359") # Alignment specifier is less than actual alignment (4), and will be ignored
370370
endif()
371+
372+
if(CV_ICC AND NOT ENABLE_NOISY_WARNINGS)
373+
foreach(flags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG)
374+
string(REGEX REPLACE "( |^)/W[0-9]+( |$)" "\\1\\2" ${flags} "${${flags}}")
375+
endforeach()
376+
endif()
371377
endif()

0 commit comments

Comments
 (0)