[vtk-developers] Header-wrapping in Modular

Marcus D. Hanwell marcus.hanwell at kitware.com
Fri Apr 20 14:32:34 EDT 2012


On Fri, Apr 20, 2012 at 2:22 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> On Fri, Apr 20, 2012 at 11:58 AM, Brad King <brad.king at kitware.com> wrote:
>
>> The current behavior was last adjusted here:
>>
>>  http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=a7fc5893
>>
>> It was a quick-fix at the time.  If you have time for a more
>> thorough solution please do so.
>
> I'll give it a shot.  It's a good opportunity to familiarize myself
> with the new cmake macros.
>
The thing we found very odd when working through the wrapping code,
but did not attempt to fix, was that the properties were normally
tested on the cxx files, but then the .h files substituted when doing
the wrapping and there is an inconsistency where some properties are
setting without a file ending and others use the file ending.

This seemed to be quite fragile, and adding all headers to the sources
made the wrapping break. We went with a solution that kept the source
list the wrappers saw similar to what it had seen pre-modularization
but it seems like the CMake wrapping code could be improved to be more
consistent and refer to the headers being wrapped rather than the
implementations.

I also added support for per-target include directories when the CMake
version is high enough, reducing rebuilds and the number of includes
getting passed to the compiler.

Marcus



More information about the vtk-developers mailing list