Changing compiler options

Andreas Pakulat apaku at gmx.de
Tue Oct 30 10:57:29 UTC 2012


Hi,

On Tue, Oct 30, 2012 at 10:52 AM, Ben Cooksley <bcooksley at kde.org> wrote:
> Hi all,
>
> Recently build.kde.org ran into some problems with building libkdcraw,
> due to CMake using the -std=iso9899:1990 option with GCC.
> It seems that this appears to be incompatible with LCMS' use of inline
> functions.

I don't think CMake does this itself. I can at least not find this
anywhere in the platform cmake files that are usually used to setup
the default arguments used for compiling something. Are you sure this
is not set by the project in question or one of the non-core CMake
modules it uses to find its dependencies? Not sure how to easily find
out which ones are being loaded so you could grep them, maybe the
--trace-options for cmake help there.

> The build log can be viewed at
> http://build.kde.org/view/FAILED/job/libkdcraw_master/38/console
> Changing it out for -std=c99 seems to fix this however - how would one
> do this with CMake?

You could try remove_definitions() but that only works if the flag was
added using add_definitions(), if its injected by setting a cmake
variable you can override that by removing the value from the string
and adding your own std. This might need a set(... FORCE CACHE).

Andreas


More information about the Kde-buildsystem mailing list