On Fri, 2019-10-11 at 10:17 -0400, Kyle Edwards wrote: > On Fri, Oct 11, 2019 at 1:36 AM Alan W. Irwin > < > alan.w.irwin1...@gmail.com > > wrote: > > The source files that have COMPILE_OPTIONS, COMPILE_DEFINITIONS, > > COMPILE_FLAGS, or INCLUDE_DIRECTORIES will also be skipped." > > This is by far the most likely reason. We added this restriction > because we don't want files that have different COMPILE_FLAGS etc. to > be lumped together in a unity file. We decided that this was good > enough as a first past, but the way forward is to intelligently group > together files that have the same COMPILE_OPTIONS, > COMPILE_DEFINITIONS, COMPILE_FLAGS, and INCLUDE_DIRECTORIES.
I saw this in the manual, and I interpreted it to mean that if we used something like set_source_files_properties() or set_property(SOURCE) to set these properties on specific source files, then those files which are impacted by this won't be part of unity builds. That seems quite sensible to me. However, I don't do that hardly anywhere at all; maybe one or two files have an extra INCLUDE_DIRECTORIES setting or similar. Virtually all my properties are set on a per-target basis, so I assumed they wouldn't be an issue here. Am I misunderstanding that? It's also possible that a previous attempt to introduce unity builds to our setup via cotire is interfering with the new, standardized unity builds. I am not too familiar with the details of that but I can try to look into it. -- 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