Yeah, those are extra build rules generated by CMake. You can build ALL_BUILD to compile all default targets. Or you can choose your target (i.e. test) and just build that. All dependancies are added automatically. Just ignore the extra junk like CLEAN_CUDA_DEPENDS and ZERO_CHECK. I think CMakeLists.txt is added to the project as a convenience so you can edit in VS without having to hunt down the file.
You don’t have to exclude anything. CMake should generate a fully working project.
I beat tmurray: DON’T USE CUTIL!!! It is not designed or intended to be used by application developers.
However, in general you do have to tell CMake what libraries to link to. It cannot determine that automatically. So if target “test” needs to be linked to /opt/myfavlib/lib/lib.a, then just use the command:
However, do note that a majority of CMake is built to make finding where library files are easy so you don’t have to hard code locations and it will thus build on anyones computer. But this is getting into CMake specific stuff, so I would suggest the CMake tutorial, the manual, or the CMake mailing list for more info.
I have a DSP code on C, and now want to port it to CUDA, but also can’t understand, what to do. I’m on KUbuntu 9.04 using Eclipse CDT. Please, tell me, how to use FindCUDA to generate project for Eclipse with CMake CDT4Generator? I’ve downloaded CMake 2.8 and FindCUDA too.
In addition to all the helpful information that MisterAnder42 has provided on the forums there is a simple example of how to use FindCUDA in a CMake script. It can be found in the svn repository where I keep my simple test system used for developement: