From 0cf5dfec2c8313fc2ed2aab8d10bf3dc4b9c283f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=BE=E8=81=AA?= Date: Thu, 14 Mar 2024 14:41:49 +0800 Subject: [PATCH] update cmakelist --- runtime/onnxruntime/bin/CMakeLists.txt | 1 + runtime/onnxruntime/src/CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/runtime/onnxruntime/bin/CMakeLists.txt b/runtime/onnxruntime/bin/CMakeLists.txt index 081746ab9..d664310a5 100644 --- a/runtime/onnxruntime/bin/CMakeLists.txt +++ b/runtime/onnxruntime/bin/CMakeLists.txt @@ -29,6 +29,7 @@ add_executable(funasr-onnx-online-punc "funasr-onnx-online-punc.cpp" ${RELATION_ target_link_libraries(funasr-onnx-online-punc PUBLIC funasr) add_executable(funasr-onnx-offline-rtf "funasr-onnx-offline-rtf.cpp" ${RELATION_SOURCE}) +target_link_options(funasr-onnx-offline PRIVATE "-Wl,--no-as-needed") target_link_libraries(funasr-onnx-offline-rtf PUBLIC funasr) add_executable(funasr-onnx-2pass "funasr-onnx-2pass.cpp" ${RELATION_SOURCE}) diff --git a/runtime/onnxruntime/src/CMakeLists.txt b/runtime/onnxruntime/src/CMakeLists.txt index d6c8a205e..6d6b66b28 100644 --- a/runtime/onnxruntime/src/CMakeLists.txt +++ b/runtime/onnxruntime/src/CMakeLists.txt @@ -1,7 +1,12 @@ file(GLOB files1 "*.cpp") +list(REMOVE_ITEM files1 "${CMAKE_CURRENT_SOURCE_DIR}/paraformer-torch.cpp") set(files ${files1}) +if(GPU) + set(files ${files} "${CMAKE_CURRENT_SOURCE_DIR}/paraformer-torch.cpp") +endif() + message("files: "${files}) if(WIN32)