[cmake-developers] [PATCH 3/3] Add the Ninja generator

Rolf Eike Beer eike at sf-mail.de
Mon Nov 14 02:18:16 EST 2011


> diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
> index 8d6f5df..bdcaf9d 100644
> --- a/Modules/Compiler/GNU.cmake
> +++ b/Modules/Compiler/GNU.cmake
> @@ -24,6 +24,15 @@ macro(__compiler_gnu lang)
>    set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
>    set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
> 
> +  # Older versions of gcc (< 4.5) contain a bug causing them to report a
> missing +  # header file as a warning if depfiles are enabled, causing
> check_header_file +  # tests to always succeed.  Work around this by
> disabling dependency tracking +  # in try_compile mode.
> +  GET_PROPERTY(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
> +  if(NOT _IN_TC OR CMAKE_FORCE_DEPFILES)
> +    set(CMAKE_DEPFILE_FLAGS_${lang} "-MMD -MF <DEPFILE>")
> +  endif()
> +
>    # Initial configuration flags.
>    set(CMAKE_${lang}_FLAGS_INIT "")
>    set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")

This may only affect Ninja, but it looks like a general bug. Shouldn't this be 
it's own commit then?

Greetings,

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20111114/7ed1449c/attachment.sig>


More information about the cmake-developers mailing list