mirror of
https://github.com/opencv/opencv.git
synced 2026-07-21 19:33:03 +04:00
fix opencv/opencv#20544 nodiscard for msvc/gcc
- includes workaround for preprocessor non-compliance - enable attribute syntax checking in msvc
This commit is contained in:
@@ -400,6 +400,9 @@ if(MSVC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Enable [[attribute]] syntax checking to prevent silent failure: "attribute is ignored in this syntactic position"
|
||||
add_extra_compiler_option("/w15240")
|
||||
|
||||
if(NOT ENABLE_NOISY_WARNINGS)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127) # conditional expression is constant
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4251) # class 'std::XXX' needs to have dll-interface to be used by clients of YYY
|
||||
|
||||
Reference in New Issue
Block a user