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

Find CUDA and set WITH_GPU #18

Merged
merged 4 commits into from
Jun 22, 2018

Conversation

wangkuiyi
Copy link
Collaborator

@wangkuiyi wangkuiyi commented Jun 21, 2018

Fix #17


if(CUDA_FOUND)
set(WITH_GPU ON)
endif(CUDA_FOUND)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if-endif might not be very right as it prevents people from building a non-GPU version on a computer with CUDA installed. Not sure what would be the best solution. @gangliao

Copy link
Owner

@gangliao gangliao Jun 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should still keep the logic order of original code. It's very useful if developers want to build a CPU-version on a computer with CUDA installed. @wangkuiyi

cmake -DWITH_GPU=OFF ..

Copy link
Owner

@gangliao gangliao Jun 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, keyword REQUIRED means CUDA must be founded. find_package(CUDA REQUIRED) will raise the compilation error. So CI will be crashed.

@gangliao gangliao merged commit e6049b4 into gangliao:master Jun 22, 2018
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

Successfully merging this pull request may close these issues.

2 participants