Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The propagation of dependencies to CUDA libraries #19

Open
wangkuiyi opened this issue Jun 21, 2018 · 0 comments
Open

The propagation of dependencies to CUDA libraries #19

wangkuiyi opened this issue Jun 21, 2018 · 0 comments

Comments

@wangkuiyi
Copy link
Collaborator

I wrote a CMakeLists.txt file like the following

nv_library(gpu_info SRCS gpu_info.cc)
cc_library(malloc SRCS malloc.cc DEPS gpu_info)
cc_test(malloc_test SRCS malloc_test.cc DEPS malloc)

The linking stage of malloc_test complains that it cannot find CUDA symbols like _cudaFree and _cudaMalloc.

I noticed that if I switch calls to cc_library and cc_test into nv_library and nv_test, the build would succeed. However, what would imply that users would have to write a lot of if(WITH_GPU) in their CMakeLists.txt files.

Is it alright to change bazel.cmake to have the behavior that if any dependent relies on CUDA, all dependees rely on CUDA too?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant