Re: [CMake] Unity builds (was: Re: [ANNOUNCE] CMake 3.16.0-rc1 is ready for testing)

2019-10-14 Thread Alan W. Irwin
On 2019-10-13 17:15-0400 Paul Smith wrote: A unity source file can lump together N real source files from the same target (library/executable) as long as those files don't have extra source-specific flags, because all other files in a given target have the same flags. I agree that it is not

Re: [CMake] Unity builds (was: Re: [ANNOUNCE] CMake 3.16.0-rc1 is ready for testing)

2019-10-14 Thread Robert Maynard via CMake
Hi Paul, As another reference point, I verified that -DCMAKE_UNITY_BUILD=ON works with the VTK-m ( https://gitlab.kitware.com/vtk/vtk-m ) project. I only verified using a clean CMake 3.16 build directory. On Thu, Oct 10, 2019 at 6:43 PM Paul Smith wrote: > > On Thu, 2019-10-10 at 14:57 -0400,

Re: [CMake] Unity builds (was: Re: [ANNOUNCE] CMake 3.16.0-rc1 is ready for testing)

2019-10-13 Thread Paul Smith
On Sat, 2019-10-12 at 19:25 -0700, Alan W. Irwin wrote: > > 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? > > I think the current documentation is ambiguous about this. But > certain target and

Re: [CMake] Unity builds (was: Re: [ANNOUNCE] CMake 3.16.0-rc1 is ready for testing)

2019-10-12 Thread Alan W. Irwin
On 2019-10-12 15:40-0400 Paul Smith wrote: 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

Re: [CMake] Unity builds (was: Re: [ANNOUNCE] CMake 3.16.0-rc1 is ready for testing)

2019-10-12 Thread Paul Smith
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

Re: [CMake] Unity builds (was: Re: [ANNOUNCE] CMake 3.16.0-rc1 is ready for testing)

2019-10-11 Thread Kyle Edwards via CMake
On Fri, Oct 11, 2019 at 1:36 AM Alan W. Irwin 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

Re: [CMake] Unity builds (was: Re: [ANNOUNCE] CMake 3.16.0-rc1 is ready for testing)

2019-10-10 Thread Alan W. Irwin
On 2019-10-10 18:21-0400 Paul Smith wrote: On Thu, 2019-10-10 at 14:57 -0400, Robert Maynard via CMake wrote: * The "UNITY_BUILD" target property was added to tell generators to batch include source files for faster compilation times. Are there any instructions on how to make this work? I

[CMake] Unity builds (was: Re: [ANNOUNCE] CMake 3.16.0-rc1 is ready for testing)

2019-10-10 Thread Paul Smith
On Thu, 2019-10-10 at 14:57 -0400, Robert Maynard via CMake wrote: > * The "UNITY_BUILD" target property was added to tell generators to > batch include source files for faster compilation times. Are there any instructions on how to make this work? I tried this: cmake -G 'Unix Makefiles'