From f1ad5cfc4aa162d55f26e4d8799fb91ecc21e064 Mon Sep 17 00:00:00 2001 From: Duyi-Wang Date: Thu, 23 Nov 2023 13:44:16 +0800 Subject: [PATCH] [CMake] Link stdc++fs in pt.so explicitly. Signed-off-by: Duyi-Wang --- src/pytorch/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pytorch/CMakeLists.txt b/src/pytorch/CMakeLists.txt index a07622c5..4eab6c54 100644 --- a/src/pytorch/CMakeLists.txt +++ b/src/pytorch/CMakeLists.txt @@ -48,5 +48,10 @@ add_library(xfastertransformer_pt SHARED ${TORCH_SRCS}) target_include_directories(xfastertransformer_pt PUBLIC ${PyTorch_INCLUDE_DIR}) # Link against LibTorch and others -target_link_libraries(xfastertransformer_pt PRIVATE OpenMP::OpenMP_CXX MPI::MPI_CXX ccl - "${TORCH_LIBS}" xfastertransformer_static) +target_link_libraries(xfastertransformer_pt + PRIVATE OpenMP::OpenMP_CXX + MPI::MPI_CXX + ccl + "${TORCH_LIBS}" + xfastertransformer_static + stdc++fs)