Use cuda_add_library and cuda_add_executable if cuda is found#576
Open
jjcasmar wants to merge 10 commits intoEyescale:masterfrom
Open
Use cuda_add_library and cuda_add_executable if cuda is found#576jjcasmar wants to merge 10 commits intoEyescale:masterfrom
jjcasmar wants to merge 10 commits intoEyescale:masterfrom
Conversation
|
It looks this will work for your case but could have undesired side effects in the general case. In particular, in complex projects that have multiple targets, you don't want to use cuda_add_foo for those ones that don't have a direct dependency on CUDA. Can you confirm what happens if you add common_find_package(CUDA) to a project that actually doesn't use it? |
Author
|
You are absolutely right. For a particular target that doesn't need CUDA, cuda_add_foo would still be called, which may be undesirable. Maybe we can activate cuda calls by setting a flag for the target set(TARGET_USE_CUDA). I have test this with a project which has some targets needing CUDA and some targets that don't and it works fine anyway, but, of course, its not perfect. |
Disable git targets on option
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.