Move some MSVC warning disablers to Configure.h

These useless warnings are popping up in VTK/ParaView builds that use
VTKm. Moving them to a header so other projects will get them.
This commit is contained in:
Allison Vacanti 2017-10-20 14:44:26 -04:00
parent 7fd7336a5d
commit e9633e1dea
2 changed files with 12 additions and 5 deletions

@ -84,11 +84,7 @@ function(vtkm_setup_msvc_properties target )
# unreachable code
#C4505 Generates numerous warnings about unused functions being
# removed when doing header test builds.
#C4512 Generates numerous warning that implicit assignment operators can't
# be constructed. This is understood and we don't care.
#C4510 Generates numerous warning that implicit constructors can't
# be constructed. This is understood and we don't care.
target_compile_options(${target} PRIVATE -wd4702 -wd4505 -wd4512 -wd4510)
target_compile_options(${target} PRIVATE -wd4702 -wd4505)
# In VS2013 the C4127 warning has a bug in the implementation and
# generates false positive warnings for lots of template code

@ -332,6 +332,17 @@
//
#pragma warning(disable:4251)
// MSVC 2013 and earlier only:
#if _MSC_VER <= 1800
// Generates numerous warnings that implicit constructors can't
// be constructed. This is understood and we don't care.
#pragma warning(disable:4510)
// Generates numerous warnings that implicit assignment operators can't
// be constructed. This is understood and we don't care.
#pragma warning(disable:4512)
#endif // MSVC <= 2013
#endif
#endif //vtkm_internal_Configure_h