[CMake] Disabling C for C++-only projects

Andreas Pakulat apaku at gmx.de
Wed Jul 25 16:39:00 EDT 2012


Hi,

On Wed, Jul 25, 2012 at 10:06 PM, Johannes Zarl <johannes.zarl at jku.at> wrote:
> Hi,
>
> Out of curiosity (and thinking about saving a couple of seconds during the
> first cmake run) I tried just to use C++ as language for some KDE program.

Really? Seconds? I mean the toolchain-stuff in CMake is more or less
hardcoded anyway, there's not a lot of runtime-checking going on
there.

> It turns out that without C enabled, standard modules like FindKDE, FindQt4
> and FindJPEG don't run because they use the CheckSymbolExists module.
>
> I'm wondering if this counts as a bug in FindQt4 and FindKDE, because after
> all these two projects are C++, so any platform test should IMO be using the
> same compiler as the build-process does?

Well, on all platforms I know it actually does use the same compiler,
just under a different name :P Also some of the platforms don't have a
C compiler at all anyway (or at least none that you'd call a proper C
compiler by todays standards). That being said, technically you're
correct, they should be using CheckCXXSymbolExists instead.

Andreas


More information about the CMake mailing list