Skip to content

cuda: suppress CMP0146 warning#24083

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
cudawarped:cuda_cmake_cmp0146
Aug 1, 2023
Merged

cuda: suppress CMP0146 warning#24083
asmorkalov merged 1 commit intoopencv:4.xfrom
cudawarped:cuda_cmake_cmp0146

Conversation

@cudawarped
Copy link
Copy Markdown
Contributor

@cudawarped cudawarped commented Aug 1, 2023

From CMake 3.27 onwards the official FindCUDA module has been depreciated, resulting in the following warning when configuring OpenCV

CMake Warning (dev) at cmake/OpenCVUtils.cmake:144 (find_package):
Policy CMP0146 is not set: The FindCUDA module is removed. Run "cmake
--help-policy CMP0146" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

This PR forces OLD behaviour to suppress the warning and ensure the official CMake FindCUDA module is still used while available.

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

@asmorkalov asmorkalov self-requested a review August 1, 2023 07:34
@asmorkalov asmorkalov self-assigned this Aug 1, 2023
Copy link
Copy Markdown
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 6791284 into opencv:4.x Aug 1, 2023
@asmorkalov asmorkalov mentioned this pull request Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants