Skip to content

Commit 8a2bbc5

Browse files
committed
python: eliminate -Wundef warning about NPY_INTERNAL_BUILD
numpy 1.13.0+
1 parent f7d99f3 commit 8a2bbc5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/python/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ if(MSVC AND NOT ENABLE_NOISY_WARNINGS)
9797
string(REPLACE "/W4" "/W3" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
9898
endif()
9999

100+
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef) # accurate guard via #pragma doesn't work (C++ preprocessor doesn't handle #pragma)
101+
100102
if(MSVC AND NOT BUILD_SHARED_LIBS)
101103
set_target_properties(${the_module} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /DEBUG")
102104
endif()

0 commit comments

Comments
 (0)