How to test for gnu extensions

Brad King brad.king at kitware.com
Fri Feb 10 01:40:16 CET 2006


Brad King wrote:
> 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.

Okay, this has been added to the CMake versions of the Check* modules. 
This should work once the Check* modules are removed from 
kdelibs/cmake/modules:

set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})

-Brad


More information about the Kde-buildsystem mailing list