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

cuda: CMake add CUDA first class language support #3400

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

cudawarped
Copy link
Contributor

@cudawarped cudawarped commented Dec 23, 2022

This PR adds CUDA first class language support which has been avaliable since CMake 3.8. Currently OpenCV uses the depreciated (since CMake 3.10) FindCUDA module.

This new feature is added automatically when OpenCV is built against CMake >= 3.18 (when the FindCUDAToolkit results variable CUDAToolkit_LIBRARY_ROOT was added). It can be disabled by passing -DENABLE_CUDA_FIRST_CLASS_LANGUAGE=OFF to CMake.

All projects which use OpenCV targets built with -DENABLE_CUDA_FIRST_CLASS_LANGUAGE=ON need to use CMake >=3.18 due to the new imported targets provided by FindCUDAToolkit.

Fixes opencv/opencv#23422, fixes opencv/opencv#23659, fixes opencv/opencv#24034, fixes opencv/opencv#24177, fixes opencv/opencv#24195, fixes #3143, fixes #3414

Dependent on opencv/opencv#23021.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@cudawarped cudawarped force-pushed the add_cuda_first_class_support branch from 9d503c4 to 878d410 Compare August 26, 2023 05:34
@cudawarped cudawarped force-pushed the add_cuda_first_class_support branch from 878d410 to ef5d109 Compare November 3, 2023 05:57
@cudawarped cudawarped force-pushed the add_cuda_first_class_support branch from ef5d109 to 2fd7091 Compare November 30, 2023 09:16
@cudawarped cudawarped force-pushed the add_cuda_first_class_support branch from 2fd7091 to 1ae5f03 Compare December 14, 2023 16:15
Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

👍

@asmorkalov asmorkalov merged commit d680f58 into opencv:4.x Dec 26, 2023
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment