mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Enable more C++ warnings (#143099)
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/143099 Approved by: https://github.com/albanD
This commit is contained in:
parent
af190479c8
commit
201cb8834f
|
|
@ -1188,7 +1188,6 @@ if(APPLE)
|
|||
append_cxx_flag_if_supported("-Wno-unguarded-availability-new"
|
||||
CMAKE_OBJCXX_FLAGS)
|
||||
endif()
|
||||
append_cxx_flag_if_supported("-Wno-unused-private-field" CMAKE_CXX_FLAGS)
|
||||
append_cxx_flag_if_supported("-Wno-missing-braces" CMAKE_CXX_FLAGS)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -785,11 +785,6 @@ if(HAVE_SOVERSION)
|
|||
endif()
|
||||
torch_compile_options(torch_cpu) # see cmake/public/utils.cmake
|
||||
|
||||
# Ignore Wdeprecated-XXX errors from third-party libraries
|
||||
if(NOT MSVC)
|
||||
set_source_files_properties(${PROJECT_SOURCE_DIR}/torch/csrc/distributed/c10d/socket.cpp PROPERTIES COMPILE_OPTIONS "-Wno-error=deprecated")
|
||||
endif()
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND NOT USE_IOS AND NOT USE_COREML_DELEGATE)
|
||||
target_compile_options_if_supported(torch_cpu "-Wmissing-prototypes")
|
||||
target_compile_options_if_supported(torch_cpu "-Werror=missing-prototypes")
|
||||
|
|
|
|||
|
|
@ -29,9 +29,7 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated")
|
||||
#include <fmt/chrono.h>
|
||||
C10_DIAGNOSTIC_POP()
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/ranges.h>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user