Skip to content

Commit

Permalink
Merge pull request #1 from denghuilu/patch-1
Browse files Browse the repository at this point in the history
Add USE_CUDA_TOOLKIT definition
  • Loading branch information
amcadmus authored Sep 25, 2019
2 parents 70c5398 + e4edd75 commit 78c997a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ if(GIT_FOUND)
)
endif(GIT_FOUND)

# define USE_CUDA_TOOLKIT
if (USE_CUDA_TOOLKIT)
add_definitions("-DUSE_CUDA_TOOLKIT")
endif()

# global defines
list (APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-ignored-attributes")
Expand Down
2 changes: 1 addition & 1 deletion source/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ file(GLOB INC_SRC include/*.h ${CMAKE_CURRENT_BINARY_DIR}/version.h)
add_library(${libname} SHARED ${LIB_SRC})

if (USE_CUDA_TOOLKIT)
target_link_libraries (${libname} libcudart.so)
target_link_libraries (${libname} ${CUDA_LIBRARIES})
endif()

install(TARGETS ${libname} DESTINATION lib/)
Expand Down

0 comments on commit 78c997a

Please sign in to comment.