CMake is a compilation tool used for relatively complex project/library compilation management. I suspect you do not need a CMakeList, and you’ll be fine reproducing one of the more simpler makefiles that come with the CUDA samples.
Edit: I see from your other posts (you should really keep it streamlined and put as much detail into a specific post as you can rather than spread them around) that you’re apparently trying to compile some sort of opencv+cuda application that was probably handed down to you and uses CMake, yes?
What I am guessing, and why you wanted CUDA 4.0, or 4.2, for that matter in your other post, is that because the paths in the CUDA toolkit have changed from v4.2 → v5/v6, your cmake files are not finding the correct directories files. It might not be all CUDA related though, so check the paths for any other built-in functions.
Yes, what you guessed is exactly correct!
I am trying to build a handed down from internet. The cource code is made up of many libraries including CUDA.
I can build CUDA sampler code in /usr/local/cuda-6.0/samples/ successfully, and the built code can also be executed correctly.
After I installed CUDA 6.0 on my ubuntu, I can build OpenCV 2.4.8 correctly.
From above experiments, I can ensure CUDA is correctly installed on my ubuntu, and I know how to set the default CUDA path.
The code I downloaded can also be built correctly. The problem I encountered is that some cudaMem related issues happened during linking.
In the code I downloaded, there are some other paths related with CUDA4.0. The paths are different with CUDA 6.0. I don’t know how to find the corresponding paths for them on CUDA 6.0.
Such as,