How to test for gnu extensions

Brad King brad.king at kitware.com
Fri Feb 10 00:49:16 CET 2006


David Faure wrote:
> Thanks. That makes sense ... and it almost works :) The quoting seems to go wrong.
> 
> I tried this:
> 
> +set(CMAKE_REQUIRED_FLAGS ${_KDE4_PLATFORM_DEFINITIONS})
> +MESSAGE("from ConfigureChecks.cmake : ${CMAKE_REQUIRED_FLAGS}")
> 
> And I get this:
> 
> from ConfigureChecks.cmake : -D_XOPEN_SOURCE=500;-D_BSD_SOURCE;-D_GNU_SOURCE

Oops, I didn't notice that _KDE4_PLATFORM_DEFINITIONS is a list and not 
a string.  The CMAKE_REQUIRED_FLAGS variable is supposed to be a string 
of compiler flags.  I'll update the Check* cmake modules to support a 
CMAKE_REQUIRED_DEFINITIONS for this purpose.

-Brad


More information about the Kde-buildsystem mailing list