Search the web
Sign In
New User? Sign Up
kicad-devel · Kicad Developers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.

Messages

  Messages Help
Advanced
CMake on Linux   Topic List   < Prev Topic  |  Next Topic >
Reply < Prev Message  | 

First, thanks to Mateusz for setting this up.

I am now able to build for "debug" or "release" modes. The technique
involves two out of source build trees, one for debug and one for
release. Remember that for the "out of source" cmake build tree
generation process to work, you may not have a
<projectroot>/CMakeCache.txt file, so first delete that "in source
tree" cache file if it exists first.

Here is a mini-howto for for others:


1) Read this:
http://www.cmake.org/pipermail/cmake/2006-October/011460.html

2) Create two out of source directories, release and debug:
$ cd <projectroot>
$ mkdir release
$ mkdir debug

3) create the release "out of source" makefile:
$ cd release
$ cmake -DCMAKE_BUILD_TYPE=Release ../
$ cd ..

4) create the debug "out of source" makefile, with verbose option:
$ cd debug
$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=1 ../
$ cd ..

To then make the debug version:

$ cd debug
$ make

or the release version

$ cd release
$ make


Below here, I have not tested yet, but it is my best guess and we
should test it and report back here, then eventually update the
install.txt file please:

Installation:

$ sudo su
# make install
# exit
$


----------------------------

IMO, the CMake system seems adequate to eventually make its way into
the prime spot as the only build system for Kicad. I will try and use
it exclusively for the indefinite future.

A) I like the out of source builds, not having the *.o files in the
source tree leaves the source tree cleaner and easier to navigate.

B) I like having *.o files pre-made so I don't have to recompile
everything when switching from debug to release. A good dependency
tracker allows incremental compiles on only the changed source files.

C) The dependency tracker in cmake seems complete, and it includes
header files as far as I can see.


Dick Hollenbeck
SoftPLC Corporation
http://softplc.com






Mon Dec 10, 2007 3:58 pm

dickelbeck
Offline Offline
Send Email Send Email

< Prev Message  | 
Expand Messages Author Sort by Date

First, thanks to Mateusz for setting this up. I am now able to build for "debug" or "release" modes. The technique involves two out of source build trees, one...
Dick H.
dickelbeck
Offline Send Email
Dec 10, 2007
3:58 pm

... Yes cmake seems to do the trick on the svn bits and I want to make a debuggable version...I'm new to cmake and something seems to be missing in the...
Frank Bennett
bennett782003
Offline Send Email
Feb 6, 2008
9:47 pm

Hi, ... You should probably read the how-to-build-kicad.txt from the main directory. The steps are slightly changed in svn: ...
Mateusz Skowroński
f3nix82
Offline Send Email
Feb 6, 2008
10:00 pm

... http://kicad.svn.sourceforge.net/viewvc/kicad/trunk/kicad/how-to-build-kicad.txt?view=markup ... Not....what else does cmake need or looking for? Using: ...
Frank Bennett
bennett782003
Offline Send Email
Feb 23, 2008
11:27 pm

Hi, ... You should add "--enable-debug --enable-debug_gdb" to the configure line since You are making a _debug build_. ... prefix=/usr/local/wx should not be...
Mateusz Skowroński
f3nix82
Offline Send Email
Feb 24, 2008
12:00 am

... Ok. /s/opt/svn/wxWidgets-2.8.7# ./configure --enable-monolithic \ --enable-unicode=no --enable-shared=no --with-opengl \ --with-libpng=builtin...
Frank Bennett
bennett782003
Offline Send Email
Feb 24, 2008
8:29 pm

... Frank, In situations like this I have had some luck writing a shell script as a shim between the program being chain loaded and the caller. In this case ...
Dick Hollenbeck
dickelbeck
Offline Send Email
Feb 26, 2008
5:59 pm

Hi, ... What is the output of wx-config --debug=yes --libs ??? ... Mateusz...
Mateusz Skowroński
f3nix82
Offline Send Email
Feb 27, 2008
7:29 pm

... wx-config to ... same: /s/opt/svn/kicad/trunk/kicad/Build/Debug# wx-config --debug=yes --libs -L/usr/local/lib -pthread /usr/local/lib/libwx_gtk2d-2.8.a...
Frank Bennett
bennett782003
Offline Send Email
Feb 27, 2008
8:16 pm

... Hi, try this please: cmake -DCMAKE_BUILD_TYPE=Debug -DwxWidgets_USE_DEBUG=ON -DwxWidgets_CONFIG_EXECUTABLE=/usr/local/wx/bin/wx-config ../../ Cheers, ...
Mateusz Skowroński
f3nix82
Offline Send Email
Feb 27, 2008
9:24 pm

... <skowri@> ... configure ... --with-regex=builtin \ ... /usr/local/wx/lib/libwx_gtk2-2.8.a ... -lgdk_pixbuf-2.0 -lm ... -lXcursor ... -lgobject-2.0 ... ...
Frank Bennett
bennett782003
Offline Send Email
Feb 27, 2008
9:51 pm

... I've made a quick debian install. Compiled wxwidgets with the same prefix as You and the above command worked for me. Where is Your wx-config located?? ...
Mateusz Skowroński
f3nix82
Offline Send Email
Feb 27, 2008
10:04 pm

... <skowri@> ... --enable-monolithic \ ... -pthread ... -lwxzlibd-2.8 ... /s/opt/svn/kicad/trunk/kicad/Build/Debug# which wx-config /usr/local/bin/wx-config...
Frank Bennett
bennett782003
Offline Send Email
Feb 27, 2008
10:20 pm

... Change -DwxWidgets_CONFIG_EXECUTABLE=/usr/local/wx/bin/wx-config to -DwxWidgets_CONFIG_EXECUTABLE=/usr/local/bin/wx-config Cheers...
Mateusz Skowroński
f3nix82
Offline Send Email
Feb 27, 2008
10:23 pm

... <skowri@> ... SkowroÃÆ'…„ski" ... SkowroÃÆ'…„ski" ... ...
Frank Bennett
bennett782003
Offline Send Email
Feb 27, 2008
11:18 pm

... You're welcome. Happy hacking. Mateusz...
Mateusz Skowroński
f3nix82
Offline Send Email
Feb 28, 2008
12:27 am

... -DwxWidgets_CONFIG_EXECUTABLE=/usr/local/bin/wx-config ../../ ... works fine (make, make install) in ../../Build/Debug, kicad runs fine, but not in the...
Frank Bennett
bennett782003
Offline Send Email
Mar 11, 2008
9:16 pm

... wx-config must be in your path. And this is a binary built as part of the wxwidgets build. When I built a debug version of wxwidgets, I got a second copy...
Dick Hollenbeck
dickelbeck
Offline Send Email
Feb 24, 2008
4:44 am

... This maillist howto is now superseded by the file how-to-build-kicad.txt. Please follow those instructions carefully and precisely. However, before you do...
Dick Hollenbeck
dickelbeck
Offline Send Email
Feb 6, 2008
10:06 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help