How to test for gnu extensions
William A. Hoffman
billlist at nycap.rr.com
Fri Feb 10 14:52:26 CET 2006
At 07:40 AM 2/10/2006, David Faure wrote:
>On Thursday 09 February 2006 21:54, William A. Hoffman wrote:
>> The name of the macro is
>> check_c_source_compiles not CheckCSourceCompiles.
>
>BTW that's quite surprising/inconsistent.
>The documentation talks about CheckCSourceCompiles, not about check_c_source_compiles.
The documentation is actually correct:
$ ./bin/cmake --help-module CheckCSourceCompiles
cmake version 2.3-20060209
CheckCSourceCompiles
macro which checks if the source code compiles
CHECK_C_SOURCE_COMPILES(SOURCE VAR)
SOURCE - source code to try to compile
VAR - variable to store size if the type exists.
The following variables may be set before calling this macro to modify
the way the check is run:
CMAKE_REQUIRED_FLAGS = string of compile command line flags
CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
CMAKE_REQUIRED_INCLUDES = list of include directories
CMAKE_REQUIRED_LIBRARIES = list of libraries to link
The convention for files is upper case/ lower case to separate the words.
However, since we use all caps for macro names, that does not work as well,
and we use _ to separate.
-Bill
More information about the Kde-buildsystem
mailing list