kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #00962
Re: CMake on Linux
--- In kicad-devel@xxxxxxxxxxxxxxx, "Dick H." <dick@...> wrote:
>
>
> 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.
>
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 following....
> Here is a mini-howto for for others:
>
> 1) Read this:
> http://www.cmake.org/pipermail/cmake/2006-October/011460.html
Ok, not much there!
>
> 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 ../
I get:
/s/opt/svn/kicad/release# cmake -DCMAKE_BUILD_TYPE=Release ..
-- Check for installed OpenGL -- found
-- Check for installed Boost -- found
-- Found wxWidgets: TRUE
-- Check for installed wxWidgets -- found
-- Check for installed zlib -- found
-- Configuring done
-- Generating done
-- Build files have been written to: /s/opt/svn/kicad
> $ cd ..
>
> 4) create the debug "out of source" makefile, with verbose option:
> $ cd debug
> $ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=1 ../
and I get:
/s/opt/svn/kicad/debug# cmake -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_VERBOSE_MAKEFILE=1 ../
-- Check for installed OpenGL -- found
-- Check for installed Boost -- found
-- Found wxWidgets: TRUE
-- Check for installed wxWidgets -- found
-- Check for installed zlib -- found
-- Configuring done
-- Generating done
-- Build files have been written to: /s/opt/svn/kicad
> $ cd ..
>
There is nothing in debug or release at this point!
My *.o's went in /s/opt/svn/kicad/*/CMakeFiles/*.dir/
Help!
thanks,
Frank Bennett
> 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
References