CUDA CMAKE RTX 3070 wrong compute capability

Hi,
I have RTX 3070 with CUDA 12.2 installed. I am using cmake for my compilation

My code seems running, but I have this error notification in my Neovim editor


When I run the device properties, I see my compute capability is 8.6.
Screenshot from 2024-02-27 16-18-23

How can I get my cmake to take the accurate compute capability?
Thanks in advance.

Hi Robert,
Thanks for the answer. I have looked into the discussion. However, if I want the CMakeLists.txt to run on different GPU’s, as in on different computers, specifying " ```
gencode arch=compute_50,code=sm_50>)

Thanks and regards,