On 02/06/2018 03:19 AM, Claus Klein wrote:
> IMHO: This make ninja slower without much user benefit!

For reference, the change was made for CMake 3.6 here:

  
https://gitlab.kitware.com/cmake/cmake/commit/6d74e7870b8804a5af0bc395a9fbb45c1b3d26a4

The benefit is that sources recompile when system headers change
after an update to system packages.  During discussion of the
change from -MMD to -MD, it was claimed that the performance
impact was minimal:

  https://cmake.org/Bug/view.php?id=14914#c40684

Maybe that's true in some environments but not others.

> On Thu, Nov 30, 2017 at 12:09:55 -0800, Evan Martin wrote:
>> That CMake change is interesting.  While it's true that it is more correct
>> to check the state of the system headers, it's also true that to be fully
>> correct here you need a completely hermetic build.  If CMake doesn't also
>> check the compiler binary as well as any shared libraries that the compiler
>> binary uses, then I think using this extra flag only serves to make ninja
>> slower without much user benefit.

Robustness to some system updates is still valuable even without
being robust to all system updates.

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
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers

Reply via email to