CMake 3.28.0 CUDAToolkit regression on not providing CUDA::cupti target
I'm trying to use `FetchContent_Declare()` with CMake 3.28.0 as following: ```plaintext FetchContent_Declare( repo-backend GIT_REPOSITORY https://github.com/triton-inference-server/backend.git GIT_TAG main GIT_SHALLOW ON) FetchContent_MakeAvailable(repo-backend) ``` But getting error during the generation step against this block https://github.com/triton-inference-server/backend/blob/main/CMakeLists.txt#L215C9-L215C20: ```plaintext CMake Error at /tmp/tritonbuild/tensorrtllm/build/_deps/repo-backend-src/CMakeLists.txt:212 (target_link_libraries): Target "triton-backend-utils" links to: CUDA::cupti but the target was not found. Possible reasons include: * There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing. ``` I had tried to set following options but without luck including use `EXCLUDE_FROM_ALL` as given in documentation ```plaintext +cmake_policy(SET CMP0154 OLD) +cmake_policy(SET CMP0146 OLD) +enable_language(CUDA) +find_package(CUDAToolkit) + +set(FETCHCONTENT_TRY_FIND_PACKAGE_MODE ALWAYS) ``` --- Can you advise what need to be considered in order to keep up with latest CMake version?
issue