Reenable deprecation warnings on Windows

This commit is contained in:
John Keiser 2020-04-20 13:19:58 -07:00
parent c8140068ad
commit 3e9e14f4d6
2 changed files with 7 additions and 1 deletions

View File

@ -52,7 +52,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
add_library(simdjson-flags INTERFACE)
if(MSVC)
target_compile_options(simdjson-flags INTERFACE /nologo)
target_compile_options(simdjson-flags INTERFACE /WX /W3 /wd4996 /wd4267 /wd4244)
target_compile_options(simdjson-flags INTERFACE /WX /W3 /wd4267 /wd4244)
else()
target_compile_options(simdjson-flags INTERFACE -fPIC)
target_compile_options(simdjson-flags INTERFACE -Werror -Wall -Wextra -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self)

View File

@ -5,6 +5,10 @@
namespace simdjson {
// VS2017 reports deprecated warnings when you define a deprecated class's methods.
SIMDJSON_PUSH_DISABLE_WARNINGS
SIMDJSON_DISABLE_DEPRECATED_WARNING
// Because of template weirdness, the actual class definition is inline in the document class
WARN_UNUSED bool dom::parser::Iterator::is_ok() const {
@ -469,6 +473,8 @@ bool dom::parser::Iterator::relative_move_to(const char *pointer,
return found;
}
SIMDJSON_POP_DISABLE_WARNINGS
} // namespace simdjson
#endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H