[CMake] Kdev 3.4 CMake Debug

Alexander Neundorf a.neundorf-work at gmx.net
Sat Apr 26 17:51:10 EDT 2008


On Saturday 26 April 2008, Sebastian Adolf wrote:
> Hello!
>
> I generated a new CMAKE-Project with the help of the kdev wizard and
> managed to compile it and include an external library. my problem now is
> that i can't run the debugger within kdev, it always states
> "No executable file specified. use the "file" or "exec-file" command"
> followed by several "no registers"-errors

Hmm. cmake should enter the first executable target it finds into Project 
Options -> Run options. You should see phasevocoder there.

> my cmakelists.txt
>
> PROJECT(phasevocoder)
>
> #if you don't want the full compiler output, remove the following line
> SET(CMAKE_VERBOSE_MAKEFILE ON)
> #add definitions, compiler switches, etc.
> ADD_DEFINITIONS(-Wall -O2)
> #list all source files here
> ADD_EXECUTABLE(phasevocoder main.cpp)
> #need to link to some other libraries ? just add them here
> #TARGET_LINK_LIBRARIES(phasevocoder png jpeg)
> include_directories(/usr/include)
> TARGET_LINK_LIBRARIES(phasevocoder sndfile)

You shouldn't use LINK_LIBRARIES(), but always TARGET_LINK_LIBRARIES().

Alex


More information about the CMake mailing list