Trying to do a debug build

Hello everyone!

I am trying to do a debug build. I am following the instructions at
gnuradio/wiki/BuildGuide page:

matt@matt-Inspiron-1525:~/src/gnuradio/build$ cmake
-DCMAKE_BUILD_TYPE=Debug

but this is what i get:

CMake Error: The source directory “/home/matt/src/gnuradio/build” does
not appear to contain CMakeLists.txt.

What am i doing wrong here?

Thanks!

On Tue, Sep 3, 2013 at 9:37 AM, Matt D [email protected] wrote:

not appear to contain CMakeLists.txt.

What am i doing wrong here?

Thanks!


Matt D

You have to tell cmake where the source directory is. Looks like for
you it’s one level up, so append " …/" to your cmake command.


Tom
Visit us at GRCon13 Oct. 1 - 4
http://www.trondeau.com/grcon13

On 09/03/2013 10:22 AM, Tom R. wrote:

I accidentally did with only one dot “./”. however it is building now.
will this work?

I don’t think so. That seems a very odd response since ./ is your
current directory, which doesn’t have the source in it. I’d stop it,
clear your build directory, and try again to make sure nothing odd
happens.

oh so i stopped it, cleared the build dir and did:

matt@matt-Inspiron-1525:~/src/gnuradio/build$ cmake …/
-DCMAKE_BUILD_TYPE=Debug

now i get:

CMake Error at CMakeLists.txt:22 (message):
Prevented in-tree build. This is bad practice.
– Configuring incomplete, errors occurred!

i am still missing something here.

On Tue, Sep 03, 2013 at 10:35:56AM -0400, Tom R. wrote:

Ok, so it looks like you’ve copied the source into your build
directory or something. At least, there’s something wrong with your
directories, the location of the source code, or where you’re building
from.

This can also happen when you called cmake directly from the source dir
at one point. If this is the case, you will have some files in your
source dir (src/gnuradio) which shouldn’t be there. If you haven’t
touched anything, the easiest way to get rid of these is

$ git clean -xdf

If you don’t want to do that, clear out anything from the source dir
related to cmake except for the directory cmake/ and the file
CMakeLists.txt.

MB


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association

On 09/03/2013 10:43 AM, Martin B. (CEL) wrote:

i am still missing something here.

$ git clean -xdf

If you don’t want to do that, clear out anything from the source
dir related to cmake except for the directory cmake/ and the
file CMakeLists.txt.

MB

Hi,
the only other file in src/gnuradio is CMakeCache.txt so i deleted it.
then ran

cmake …/-DCMAKE_BUILD_TYPE=Debug

in build directory. it is building now. So is all well?

On Tue, Sep 3, 2013 at 10:32 AM, Matt D [email protected] wrote:

oh so i stopped it, cleared the build dir and did:
i am still missing something here.
Ok, so it looks like you’ve copied the source into your build
directory or something. At least, there’s something wrong with your
directories, the location of the source code, or where you’re building
from.

Make sure that the source code is checked out into ~/src/gnuradio.
Then follow these steps:

$ cd ~/src/gnuradio
$ rm -rf build
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=“Debug” …/

That’s just to make absolutely certain your build directory isn’t in
some confusing state.


Tom
Visit us at GRCon13 Oct. 1 - 4
http://www.trondeau.com/grcon13