python: eliminate -Wundef warning about NPY_INTERNAL_BUILD

numpy 1.13.0+
This commit is contained in:
Alexander Alekhin 2017-08-22 11:56:55 +03:00
parent 89172c08a2
commit ea6fe71a50

View File

@ -118,6 +118,7 @@ if(MSVC AND NOT ENABLE_NOISY_WARNINGS)
endif()
ocv_warnings_disable(CMAKE_CXX_FLAGS -Woverloaded-virtual -Wunused-private-field)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef) # accurate guard via #pragma doesn't work (C++ preprocessor doesn't handle #pragma)
if(MSVC AND NOT BUILD_SHARED_LIBS)
set_target_properties(${the_module} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /DEBUG")