# How to set CC (CUDA Compute Capability) 5.0 in CMake?

**URL:** https://discourse.cmake.org/t/how-to-set-cc-cuda-compute-capability-5-0-in-cmake/4283
**Category:** Usage
**Created:** [October 14, 2021, 3:24pm UTC](https://discourse.cmake.org/t/how-to-set-cc-cuda-compute-capability-5-0-in-cmake/4283 "2021-10-14T15:24:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sharmin\_Sultana\_Sheu](https://discourse.cmake.org/user_avatar/discourse.cmake.org/sharmin_sultana_sheu/32/1096_2.png) [@Sharmin\_Sultana\_Sheu](https://discourse.cmake.org/u/Sharmin_Sultana_Sheu)
#### Post date: [October 14, 2021, 3:24pm UTC](https://discourse.cmake.org/t/how-to-set-cc-cuda-compute-capability-5-0-in-cmake/4283/1 "2021-10-14T15:24:22Z")

</div>

Hi  
I am a new bee in this field.  
I am using CUDA version 11040  
windows 10  
CMake version:3.21.3  
and 2 GPU:NVIDIA Quadro M1200 and Intel HD graphics 630.  
And having the error : CUDA Error: no kernel image is available for execution on the device while running darknet.

To solve this error I need to set CC (CUDA Compute Capability) 5.0 in CMake.  
Can anyone please suggest to me How can I set CC (CUDA Compute Capability) 5.0 in CMake?

Please help me with this.

Regards  
Sharmin

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [October 15, 2021, 11:30pm UTC](https://discourse.cmake.org/t/how-to-set-cc-cuda-compute-capability-5-0-in-cmake/4283/2 "2021-10-15T23:30:03Z")

</div>

Cc: @robert.maynard

---

<div class="post-metadata">

### Author: ![robert.maynard](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robert.maynard/32/4_2.png) [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)
#### Post date: [October 18, 2021, 6:38pm UTC](https://discourse.cmake.org/t/how-to-set-cc-cuda-compute-capability-5-0-in-cmake/4283/3 "2021-10-18T18:38:42Z")

</div>

Set the CMAKE\_CUDA\_ARCHITECTURES variable to `50` so that you compile for the GPU architecture you have.
