Skip to content

Commit

Permalink
change propagate of CUDA libraries to PUBLIC
Browse files Browse the repository at this point in the history
In deepmodeling#976, propagate was changed from PRIVATE to PUBLIC. However, `libdeepmd` actually includes the CUDA libraries in the `gelu.cc` file.
  • Loading branch information
njzjz committed May 13, 2022
1 parent c4f0cec commit 0bdb92b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ if (USE_CUDA_TOOLKIT)
add_definitions("-DGOOGLE_CUDA")
add_subdirectory(src/cuda)
set (EXTRA_LIBS ${EXTRA_LIBS} deepmd_op_cuda)
target_link_libraries (${libname} INTERFACE ${CUDA_LIBRARIES} ${EXTRA_LIBS})
target_link_libraries (${libname} PUBLIC ${CUDA_LIBRARIES})
target_link_libraries (${libname} INTERFACE ${EXTRA_LIBS})
# gpu_cuda.h
target_include_directories(${libname} PUBLIC ${CUDA_INCLUDE_DIRS})
endif()
Expand All @@ -20,7 +21,8 @@ if (USE_ROCM_TOOLKIT)
add_definitions("-DTENSORFLOW_USE_ROCM")
add_subdirectory(src/rocm)
set (EXTRA_LIBS ${EXTRA_LIBS} deepmd_op_rocm)
target_link_libraries (${libname} INTERFACE ${ROCM_LIBRARIES} ${EXTRA_LIBS})
target_link_libraries (${libname} PUBLIC ${ROCM_LIBRARIES})
target_link_libraries (${libname} INTERFACE ${EXTRA_LIBS})
# gpu_rocm.h
target_include_directories(${libname} PUBLIC ${ROCM_INCLUDE_DIRS})
endif()
Expand Down

0 comments on commit 0bdb92b

Please sign in to comment.