From 2ee201a7d06608f26d8a2239c2bd87237328499e Mon Sep 17 00:00:00 2001 From: cyy Date: Tue, 27 Aug 2024 01:48:21 +0000 Subject: [PATCH] [CMake] Remove BUILDING_WITH_TORCH_LIBS (#134434) Since BUILDING_WITH_TORCH_LIBS is not used now. Pull Request resolved: https://github.com/pytorch/pytorch/pull/134434 Approved by: https://github.com/ezyang --- CMakeLists.txt | 4 ---- scripts/build_windows.bat | 4 ---- tools/setup_helpers/cmake.py | 1 - 3 files changed, 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5139c0a478e..f3531e9ad9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -490,10 +490,6 @@ if(USE_SYSTEM_LIBS) endif() endif() -# Used when building Caffe2 through setup.py -option(BUILDING_WITH_TORCH_LIBS - "Tell cmake if Caffe2 is being built alongside torch libs" ON) - # /Z7 override option When generating debug symbols, CMake default to use the # flag /Zi. However, it is not compatible with sccache. So we rewrite it off. # But some users don't use sccache; this override is for them. diff --git a/scripts/build_windows.bat b/scripts/build_windows.bat index fbdade94353..60bfebad08c 100644 --- a/scripts/build_windows.bat +++ b/scripts/build_windows.bat @@ -22,10 +22,6 @@ if NOT DEFINED BUILD_SHARED_LIBS ( ) ) -IF NOT DEFINED BUILDING_WITH_TORCH_LIBS ( - set BUILDING_WITH_TORCH_LIBS=OFF -) - if NOT DEFINED CAFFE2_STATIC_LINK_CUDA ( set CAFFE2_STATIC_LINK_CUDA=OFF ) diff --git a/tools/setup_helpers/cmake.py b/tools/setup_helpers/cmake.py index d50d9d54739..4b605fe5975 100644 --- a/tools/setup_helpers/cmake.py +++ b/tools/setup_helpers/cmake.py @@ -204,7 +204,6 @@ class CMake: "UBSAN_FLAGS", "BLAS", "WITH_BLAS", - "BUILDING_WITH_TORCH_LIBS", "CUDA_HOST_COMPILER", "CUDA_NVCC_EXECUTABLE", "CUDA_SEPARABLE_COMPILATION",