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 ()
@@ -663,6 +662,11 @@ endif()
663662# External closure: feature consumers precede numerical providers and runtimes.
664663target_link_libraries (${ABACUS_BIN_NAME} PRIVATE abacus::link_libs )
665664
665+ # Torch includes some LAPACK routines, but with floating-point exceptions.
666+ if (ENABLE_MLALGO OR DEFINED Torch_DIR)
667+ target_link_libraries (${ABACUS_BIN_NAME} PRIVATE ${TORCH_LIBRARIES} )
668+ endif ()
669+
666670# Apply feature definitions and common compile usage requirements only after all
667671# source targets have been created.
668672abacus_apply_build_options_to_dir ("${CMAKE_CURRENT_SOURCE_DIR } " )
You can’t perform that action at this time.
0 commit comments