> 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
signature.asc
Description: This is a digitally signed message part.
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers