From 8a2bbc57e42ebdf222628425778d2fc477b66352 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 22 Aug 2017 11:56:55 +0300 Subject: [PATCH] python: eliminate -Wundef warning about NPY_INTERNAL_BUILD numpy 1.13.0+ --- modules/python/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/python/CMakeLists.txt b/modules/python/CMakeLists.txt index 354c786cb3..0804fe1c08 100644 --- a/modules/python/CMakeLists.txt +++ b/modules/python/CMakeLists.txt @@ -97,6 +97,8 @@ if(MSVC AND NOT ENABLE_NOISY_WARNINGS) string(REPLACE "/W4" "/W3" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") endif() +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") endif()