kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #00806
CMake on Linux
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
Follow ups