[vtk-developers] VTK_MAJOR_VERSION is no longer #define'ed

Bill Lorensen bill.lorensen at gmail.com
Wed Apr 25 11:13:31 EDT 2012


I guess because it would require a rebuild each night?

On Wed, Apr 25, 2012 at 11:12 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Why not include vtkVersion.h in vtkConfigure.h?
>
> On Wed, Apr 25, 2012 at 11:07 AM, Brad King <brad.king at kitware.com> wrote:
>> On 4/25/2012 11:02 AM, David Gobbi wrote:
>>>
>>> On Wed, Apr 25, 2012 at 8:55 AM, Brad King<brad.king at kitware.com>  wrote:
>>>>
>>>>
>>>> If your goal is to write code that works with multiple versions of
>>>> VTK I don't think including a header with "Version" in its name
>>>> is too much to ask.
>>>
>>>
>>> I may be missing something here, but in VTK 5.x that header doesn't
>>> exist, so how can it be included in code that is meant to run on
>>> multiple versions of VTK?
>>
>>
>> The "vtkVersion.h" header has always existed and it includes the
>> new header.  Just do:
>>
>>  #include "vtkVersion.h"
>>  #if VTK_MAJOR_VERSION <= 5
>>  ...
>>  #endif
>>
>> and it will work in all versions.  The only reason the new header
>> exists is to allow C sources to include it without getting the
>> vtkVersion class.
>>
>> -Brad
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com



-- 
Unpaid intern in BillsBasement at noware dot com



More information about the vtk-developers mailing list