I’m guessing you are trying to copy the code and use it for your own purposes. The code in question is part of a larger system which defined the rtt_kernel target elsewhere.
The error in question comes from trying to set a properly on a target that doesn’t exist. There are several ways to create a target. Here are the most common:
There’s no really good way to determine what your problem is without seeing your CMakeLists.txt file, but presumably there hasn’t been a call to one of these functions previous to the call to set_target_properties.
If you are trying to adapt your system to use this code, I would suggest you ignore the block of code after the if (WIN32) since this code is attempting to modify the targets for a particular system.
There are a couple of online resources for CMake. Go to the CMake website and click under Help (http://www.cmake.org/ ). The mailing list is particularly good for asking questions on, but if you are just starting out the CMake book is great. The wiki and poking around CMake’s CMakeLists.txt files are also instructive. Any questions directly about the FindCUDA capabilities of CMake can be posted here or on the CMake mailing list (I also monitor that).
i need help, when i use cmake it shows me the following error : CMake Error at CMakeLists.txt:16 (CUDA_ADD_EXECUTABLE):
Unknown CMake command “CUDA_ADD_EXECUTABLE”.
configuration : cmake 2.6.4, ubuntu 9.10, cuda toolkit 3.2.16
pleas help me.