File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -341,8 +341,13 @@ if(MSVC)
341
341
string (REPLACE "/W3" "/W4" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} " )
342
342
string (REPLACE "/W3" "/W4" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} " )
343
343
344
- if (NOT ENABLE_NOISY_WARNINGS AND MSVC_VERSION EQUAL 1400 )
345
- ocv_warnings_disable (CMAKE_CXX_FLAGS /wd4510 /wd4610 /wd4312 /wd4201 /wd4244 /wd4328 /wd4267 )
344
+ if (NOT ENABLE_NOISY_WARNINGS )
345
+ if (MSVC_VERSION EQUAL 1400 )
346
+ ocv_warnings_disable (CMAKE_CXX_FLAGS /wd4510 /wd4610 /wd4312 /wd4201 /wd4244 /wd4328 /wd4267 )
347
+ endif ()
348
+ if (MSVC_VERSION LESS 1900 ) # MSVS2015
349
+ ocv_warnings_disable (CMAKE_CXX_FLAGS /wd4127 ) # warning C4127: conditional expression is constant
350
+ endif ()
346
351
endif ()
347
352
348
353
# allow extern "C" functions throw exceptions
You can’t perform that action at this time.
0 commit comments