Remove outdated CMake code (#129851)

Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/129851
Approved by: https://github.com/ezyang
This commit is contained in:
cyy 2024-07-02 00:40:37 +00:00 committed by PyTorch MergeBot
parent 7e4329c258
commit 46366888d7
3 changed files with 0 additions and 11 deletions

View File

@ -773,7 +773,6 @@ 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}/aten/src/ATen/native/QuantizedLinear.cpp PROPERTIES COMPILE_OPTIONS "-Wno-error=deprecated")
set_source_files_properties(${PROJECT_SOURCE_DIR}/torch/csrc/distributed/c10d/socket.cpp PROPERTIES COMPILE_OPTIONS "-Wno-error=deprecated")
endif()
@ -1018,7 +1017,6 @@ endif()
if(USE_XPU)
add_library(torch_xpu ${Caffe2_XPU_SRCS})
torch_compile_options(torch_xpu) # see cmake/public/utils.cmake
target_compile_options_if_supported(torch_xpu "-Wno-deprecated-copy") # see cmake/public/utils.cmake
target_compile_definitions(torch_xpu PRIVATE USE_XPU)
# ATen XPU implementation

View File

@ -1300,10 +1300,6 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
caffe2_interface_library(onnx onnx_library)
endif()
list(APPEND Caffe2_DEPENDENCY_WHOLE_LINK_LIBS onnx_library)
# TODO: Delete this line once https://github.com/pytorch/pytorch/pull/55889 lands
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(onnx PRIVATE -Wno-deprecated-declarations)
endif()
else()
add_library(onnx SHARED IMPORTED)
find_library(ONNX_LIBRARY onnx)

View File

@ -282,11 +282,6 @@ if(USE_NCCL AND NOT WIN32)
list(APPEND TORCH_PYTHON_COMPILE_DEFINITIONS USE_NCCL)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80947 in EmbeddingBag.cpp
set_source_files_properties(${TORCH_SRC_DIR}/csrc/utils/throughput_benchmark.cpp PROPERTIES COMPILE_FLAGS -Wno-attributes)
endif()
if(NOT MSVC)
# cudaProfilerInitialize must go away
set_source_files_properties(${TORCH_SRC_DIR}/csrc/cuda/shared/cudart.cpp PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")