On Sat, 2019-04-27 at 13:49 -0400, Paul Smith wrote: > On Fri, 2019-04-26 at 17:26 -0400, Paul Smith wrote: > > We're trying to implement precompiled headers (yes, I've seen all the > > various github projects around this). As part of this we need to make > > sure the precompiled header is rebuilt whenever any of the headers that > > it includes changes: this seems like exactly the job for > > add_custom_command's IMPLICIT_DEPENDS. > > > > But, it doesn't seem to be doing anything at all for me so I wonder > > what I'm doing wrong. > > OK, I figured out the issue. The problem is a combination of the way I > was testing and a sort of bizarre "feature" of the CMake Makefile > generator
I re-confirmed the documented restriction that IMPLICIT_DEPENDS is not available for non-Makefile generators (e.g., Ninja). Without this facility it seems impossible to support precompiled headers in CMake, so I've had to disable PCH for non-Makefile (and non- MSVC of course) generators. Is there any chance of getting IMPLICIT_DEPENDS support for Ninja? Is the reason that it's not supported because Ninja does its own dependency management or something like that? Does anyone know how it's done? Is it done by using the compiler flags like -MMD/-MP etc. or does it have its own built-in facility? -- 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