Skip to content

Commit

Permalink
Try CMAKE_CUDA_LIBRARIES
Browse files Browse the repository at this point in the history
  • Loading branch information
jchen351 committed Jan 26, 2024
1 parent 0fa4f4e commit 25f9cd5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ if(USE_CUDA AND CMAKE_CUDA_COMPILER)
set_target_properties(onnxruntime-genai PROPERTIES LINKER_LANGUAGE CUDA)
set_target_properties(python PROPERTIES LINKER_LANGUAGE CUDA)
set_target_properties(Tests PROPERTIES LINKER_LANGUAGE CUDA)
message(STATUS "Adding CUDA libraries")
message(STATUS "CMAKE_CUDA_LIBRARIES: ${CMAKE_CUDA_LIBRARIES}")
target_link_libraries(onnxruntime-genai PRIVATE ${CMAKE_CUDA_LIBRARIES})
target_link_libraries(Tests PRIVATE ${CMAKE_CUDA_LIBRARIES})
target_link_libraries(python PRIVATE ${CMAKE_CUDA_LIBRARIES})
endif()


Expand Down

0 comments on commit 25f9cd5

Please sign in to comment.