[cmake-developers] why includes the Ninja decency contents sytemheader too?

Claus Klein claus.klein at arcormail.de
Tue Feb 6 10:03:06 EST 2018


Yes, it should be configurable via one option flag.

The cmake user can control it but it is not well documented and different to configure depending on compiler and generator used:

#for ninja generator:
set(CMAKE_DEPFILE_FLAGS_CXX "-MMD -MT <OBJECT> -MF <DEPFILE>" CACHE STRING "dependency flag" FORCE)

# for makefile generator:
option(CMAKE_DEPENDS_IN_PROJECT_ONLY „do NOT use system header dependencies“ ON)

###############

But I am still wondering why different default behaviors in Nina and Makefile generators?

Claus

> Am 06.02.2018 um 13:22 schrieb Brad King <brad.king at kitware.com>:
> 
> Some people want system headers checked for $reasons, and others
> don't want them checked for $other_reasons.  The only way to satisfy
> both groups is to make it an option.
> 
> The internal `CMAKE_DEPFILE_FLAGS_${lang}` table of flags used for this
> would need to be extended with `CMAKE_DEPFILE_NOSYSTEM_FLAGS_${lang}`
> alternatives.  Some option would need to be introduced to choose.
> 
> -Brad



More information about the cmake-developers mailing list