Setting compiler options

Andreas Pakulat apaku at gmx.de
Fri Nov 18 21:57:36 GMT 2011


On 18.11.11 21:54:22, Krzysztof wrote:
> On 11/17/2011 11:40 PM, Andreas Pakulat wrote:
> >On 17.11.11 22:27:20, Krzysztof wrote:
> >>Please, forget my previous post. It's just blind searching.
> >>I'd like to have the ability to set compiler options before building
> >>an application. Where should I do it?
> >>Setting e.g. this variable in CMakeLists.txt has no effect:
> >>set(CMAKE_CXX_FLAGS_DEBUG "-Wall")
> >Well, it only has an effect if you're running cmake with build type
> >Debug and in addition CMAKE_CXX_FLAGS_DEBUG is not put into the cache
> >before that line. If it is what you probably want is edit the cmake
> >cache or pass that on the CLI: cmake -DCMAKE_CXX_FLAGS_DEBUG='-Wall'.
> >
> >Andreas
> Of course, I compile in debug mode.
> Isn't there any other way to set compiler or linker options just in
> kdevelop?

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





More information about the KDevelop mailing list