65 lines
2.2 KiB
Diff
65 lines
2.2 KiB
Diff
From 2ce255b75760a0a513fb1706629b416f76a5c822 Mon Sep 17 00:00:00 2001
|
|
From: Tom Rix <trix@redhat.com>
|
|
Date: Sat, 3 Feb 2024 08:16:04 -0500
|
|
Subject: [PATCH] no third_party fmt
|
|
|
|
---
|
|
c10/CMakeLists.txt | 2 +-
|
|
cmake/Dependencies.cmake | 6 +++---
|
|
torch/CMakeLists.txt | 2 +-
|
|
3 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/c10/CMakeLists.txt b/c10/CMakeLists.txt
|
|
index 1f742f4c176..4fa08913bdd 100644
|
|
--- a/c10/CMakeLists.txt
|
|
+++ b/c10/CMakeLists.txt
|
|
@@ -87,7 +87,7 @@ endif()
|
|
if(C10_USE_GLOG)
|
|
target_link_libraries(c10 PUBLIC glog::glog)
|
|
endif()
|
|
-target_link_libraries(c10 PRIVATE fmt::fmt-header-only)
|
|
+target_link_libraries(c10 PRIVATE fmt)
|
|
|
|
if(C10_USE_NUMA)
|
|
message(STATUS "NUMA paths:")
|
|
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
|
|
index 6f5a2d5feff..42fbf80f6e8 100644
|
|
--- a/cmake/Dependencies.cmake
|
|
+++ b/cmake/Dependencies.cmake
|
|
@@ -1837,7 +1837,7 @@ endif()
|
|
#
|
|
set(TEMP_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
|
|
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs" FORCE)
|
|
-add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/fmt)
|
|
+# add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/fmt)
|
|
|
|
# Disable compiler feature checks for `fmt`.
|
|
#
|
|
@@ -1846,9 +1846,9 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/fmt)
|
|
# CMAKE_CXX_FLAGS in ways that break feature checks. Since we already know
|
|
# `fmt` is compatible with a superset of the compilers that PyTorch is, it
|
|
# shouldn't be too bad to just disable the checks.
|
|
-set_target_properties(fmt-header-only PROPERTIES INTERFACE_COMPILE_FEATURES "")
|
|
+# set_target_properties(fmt-header-only PROPERTIES INTERFACE_COMPILE_FEATURES "")
|
|
|
|
-list(APPEND Caffe2_DEPENDENCY_LIBS fmt::fmt-header-only)
|
|
+# list(APPEND Caffe2_DEPENDENCY_LIBS fmt::fmt-header-only)
|
|
set(BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS} CACHE BOOL "Build shared libs" FORCE)
|
|
|
|
# ---[ Kineto
|
|
diff --git a/torch/CMakeLists.txt b/torch/CMakeLists.txt
|
|
index 97a72eed55b..9e5014d1980 100644
|
|
--- a/torch/CMakeLists.txt
|
|
+++ b/torch/CMakeLists.txt
|
|
@@ -80,7 +80,7 @@ set(TORCH_PYTHON_LINK_LIBRARIES
|
|
python::python
|
|
pybind::pybind11
|
|
shm
|
|
- fmt::fmt-header-only
|
|
+ fmt
|
|
ATEN_CPU_FILES_GEN_LIB)
|
|
|
|
if(USE_ASAN AND TARGET Sanitizer::address)
|
|
--
|
|
2.43.2
|
|
|