File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,7 +221,6 @@ if(ENABLE_MLALGO)
221221endif ()
222222
223223if (ENABLE_MLALGO OR DEFINED Torch_DIR)
224- list (APPEND _abacus_feature_libs ${TORCH_LIBRARIES} )
225224 list (APPEND _abacus_feature_include_dirs ${TORCH_INCLUDE_DIRS} )
226225 list (APPEND _abacus_feature_compile_options ${ABACUS_TORCH_CXX_FLAGS} )
227226endif ()
@@ -664,6 +663,11 @@ endif()
664663# External closure: feature consumers precede numerical providers and runtimes.
665664target_link_libraries (${ABACUS_BIN_NAME} PRIVATE abacus::link_libs )
666665
666+ # Torch includes some LAPACK routines, but with floating-point exceptions.
667+ if (ENABLE_MLALGO OR DEFINED Torch_DIR)
668+ target_link_libraries (${ABACUS_BIN_NAME} PRIVATE ${TORCH_LIBRARIES} )
669+ endif ()
670+
667671# Apply feature definitions and common compile usage requirements only after all
668672# source targets have been created.
669673abacus_apply_build_options_to_dir ("${CMAKE_CURRENT_SOURCE_DIR } " )
You can’t perform that action at this time.
0 commit comments