[CMake] KDevelop3 and Build->Compile file

Filipe Sousa filipe at ipb.pt
Wed Jul 20 13:17:43 EDT 2005


On Wednesday 20 July 2005 17:58, David Somers wrote:
> There is a problem somewhere with the way that cmake makes the kdevelop3
> project files.
>
> Example. With a project made by KDevelop3, when I do Build->Compile file,
> the messages are:

You can't use Build->Compile. When you do that kdevelop run make source_file 
or make source_file.o. You are not using any Makefile. That's the default 
behavior of make. If you do:

$ echo "int main() { return 0; }" > main.c
$ make main
cc    -c -o main.o main.c

make call the right compiler without a Makefile

> cd '/home/users/dsomers/prj/wibble/debug/src' && WANT_AUTOCONF_2_5="1"
> WANT_AUTOMAKE_1_6="1" gmake -k wibble.lo

This in-source-building and works because there is a Makefile

> compiling fi (gcc)
> compiling wibble.o (gcc)
> /home/users/dsomers/prj/wibble/src/wibble.c: In function `main':
> /home/users/dsomers/prj/wibble/src/wibble.c:32: error: `i' undeclared
> (first use in this function)
> /home/users/dsomers/prj/wibble/src/wibble.c:32: error: (Each undeclared
> identifier is reported only once
> /home/users/dsomers/prj/wibble/src/wibble.c:32: error: for each function it
> appears in.)
> gmake: *** [wibble.lo] Error 1
> *** Exited with status: 2 ***
>
> But when I do Build->Compile file with CMake generated the project files, I
> get this
>
> cd '/home/users/dsomers/prj/checkcvswrappers/src' && gmake -k -j1
> 'checkcvswrappers.o'

With cmake and out-source-building there is no Makefile within 
'/home/users/dsomers/prj/checkcvswrappers/src'. In this case make tries do 
compile without a Makefile.

> cc -c -o checkcvswrappers.o checkcvswrappers.c
> checkcvswrappers.c:67:30: \x used with no following hex digits
> gmake: *** [checkcvswrappers.o] Error 1
> *** Exited with status: 2 ***
>
> The problem is that KDevelop isn't then able to parse the output correctly
> so next/previous error don't work fully (the editor does not jump
> automagically to the file/line).

The right way is Build->Build Project

-- 
Filipe Sousa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20050720/5e1acb60/attachment.pgp


More information about the CMake mailing list