Setting compiler options

Andreas Pakulat apaku at gmx.de
Sun Nov 20 23:07:58 GMT 2011


On 20.11.11 23:44:29, Krzysztof wrote:
> On 11/18/2011 10:57 PM, Andreas Pakulat wrote:
> >KDevelop also allows to configure the arguments for the cmake call
> >being used to set up the builddir. Since kdevelop does not have
> >its own buildsystem there's no such thing as 'configure xxx
> >options just in kdevelop', it can only be configure for cmake for
> >a specific builddir. But that builddir is not restricted to be
> >used only with kdevelop and cannot be. Andreas
> As I understand, kdevelop relies on cmake to build the program.

No it does not. KDevelop also allows to build using other buildsystems
such as automake, handwritten makefiles or something non-make based
(with the custom buildsystem plugins). It might not offer all features
for all those buildsystems though, cmake is certainly the best-supported
one.

> Which file then is the "master" file for cmake in which one can set
> all his needs to build (compiler options, include directories,
> external libraries and so on).

There is no 'master' file. Please read up on how cmake works, there's
plenty of docs on the net including the cmake manual and there's a
printed book as well.

Basically, CMakeLists.txt describes which source files and external
libraries constitute the projects targets. This file contains the
include-dir information for such external libs. There are also ways to
set up the default compiler options that the project should use in
differing configurations and more things.

Filling the actual makefiles is done based on what is found on the users
machine, this means that default compiler options may change depending
on the compiler/-version found etc. Most of the information is put into
the CMakeCache.txt file in the builddir, which a user can then manually
adjust if necessary (though this should only seldomly be needed).

Andreas





More information about the KDevelop mailing list