Commit 71259985 authored by David Cole's avatar David Cole

Fix python.h induced Visual Studio compiler warning

Python.h defines hypot to be _hypot, which can cause a level 4
warning coming from math.h with the Visual Studio compiler.
Use pragma warning to make sure that only level 1 warnings
may be emitted during the include of Python.h.

Also, remove the custom expression that was trying to suppress
this warning since it had a missing space in it that prevented
the match anyhow. It's now unnecessary since the warning is
not emitted.

Change-Id: Iaf77a0ae76ebab5056fb02d3895e2084168ad731
parent 59153446
......@@ -70,7 +70,6 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION
"xtree.[0-9]+. : warning C4702: unreachable code"
"vector.[0-9]+. : warning C4702: unreachable code"
"warning LNK4221"
"math.h.[0-9]+.: warning C4211"
"variable .var_args[2]*. is used before its value is set"
"jobserver unavailable"
"warning: \\(Long double usage is reported only once for each file"
......
......@@ -68,8 +68,16 @@ To avoid re-definitions warnings, ensure "vtkPython.h" is included
before _any_ headers that define feature macros, whether or not
they are system headers. Do NOT add any #undef lines here. */
#if defined(_MSC_VER)
# pragma warning (push, 1)
#endif
#include <Python.h>
#if defined(_MSC_VER)
# pragma warning (pop)
#endif
#ifdef VTK_PYTHON_UNDEF_DEBUG
# define _DEBUG
# undef VTK_PYTHON_UNDEF_DEBUG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment