Version tag and vtkversion defines for new module

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Version tag and vtkversion defines for new module

Bill Lorensen
Will their be a tag and version defines for the new module system. I need to support old and new in the VTKExamples.

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Version tag and vtkversion defines for new module

Andras Lasso

Yes, we need this. Please give us examples that show how to write our CMake and C++ files to work with both the old and new VTK module system.

 

Thanks!

Andras

 

From: vtk-developers <[hidden email]> On Behalf Of Bill Lorensen
Sent: Wednesday, January 9, 2019 5:58 PM
To: VTK Developers <[hidden email]>
Subject: [vtk-developers] Version tag and vtkversion defines for new module

 

Will their be a tag and version defines for the new module system. I need to support old and new in the VTKExamples.


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Version tag and vtkversion defines for new module

VTK - Dev mailing list
On Thu, Jan 10, 2019 at 05:24:17 +0000, Andras Lasso wrote:
> Yes, we need this. Please give us examples that show how to write our
> CMake and C++ files to work with both the old and new VTK module
> system.

I have some patches for WikiExamples locally, but have been focusing on
the dashboards first.

For supporting both, something like this pattern is what I was doing:

    find_package(VTK)
    if (VTK_VERSION VERSION_LESS "8.90")
      # old system
      include(${VTK_USE_FILE})
      # modules are linked via `vtkCommonCore`
      # VTK_DEFINITIONS has autoinit information
    else ()
      # modules are linked via `VTK::CommonCore`
      # vtk_module_autoinit is needed
    endif ()

WikiExamples also tries to support VTK5, so it has a bit more logic to
go in there as well.

--Ben
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Version tag and vtkversion defines for new module

Bill Lorensen
We can drop VTK5 support.

Thanks

Bill

On Thu, Jan 10, 2019, 6:05 AM Ben Boeckel <[hidden email] wrote:
On Thu, Jan 10, 2019 at 05:24:17 +0000, Andras Lasso wrote:
> Yes, we need this. Please give us examples that show how to write our
> CMake and C++ files to work with both the old and new VTK module
> system.

I have some patches for WikiExamples locally, but have been focusing on
the dashboards first.

For supporting both, something like this pattern is what I was doing:

    find_package(VTK)
    if (VTK_VERSION VERSION_LESS "8.90")
      # old system
      include(${VTK_USE_FILE})
      # modules are linked via `vtkCommonCore`
      # VTK_DEFINITIONS has autoinit information
    else ()
      # modules are linked via `VTK::CommonCore`
      # vtk_module_autoinit is needed
    endif ()

WikiExamples also tries to support VTK5, so it has a bit more logic to
go in there as well.

--Ben

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Version tag and vtkversion defines for new module

Bill Lorensen
In reply to this post by VTK - Dev mailing list
When I use
cmake_minimum_required(VERSION 3.0)


On Thu, Jan 10, 2019 at 6:05 AM Ben Boeckel <[hidden email]> wrote:

>
> On Thu, Jan 10, 2019 at 05:24:17 +0000, Andras Lasso wrote:
> > Yes, we need this. Please give us examples that show how to write our
> > CMake and C++ files to work with both the old and new VTK module
> > system.
>
> I have some patches for WikiExamples locally, but have been focusing on
> the dashboards first.
>
> For supporting both, something like this pattern is what I was doing:
>
>     find_package(VTK)
>     if (VTK_VERSION VERSION_LESS "8.90")
>       # old system
>       include(${VTK_USE_FILE})
>       # modules are linked via `vtkCommonCore`
>       # VTK_DEFINITIONS has autoinit information
>     else ()
>       # modules are linked via `VTK::CommonCore`
>       # vtk_module_autoinit is needed
>     endif ()
>
> WikiExamples also tries to support VTK5, so it has a bit more logic to
> go in there as well.
>
> --Ben



--
Unpaid intern in BillsParadise at noware dot com
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Version tag and vtkversion defines for new module

VTK - Dev mailing list
On Thu, Jan 10, 2019 at 11:13:53 -0800, Bill Lorensen wrote:
> When I use
> cmake_minimum_required(VERSION 3.0)

I'm assuming there was supposed to be more here, but CMake 3.8 is
required to use the new module system. Are there policy warnings when
doing this? If so, we should probably just set 3.8 as the policy scope
in vtk-config.cmake.

--Ben
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtk-developers