Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #11449 3rdPart/salomesmesh vtk 9.3 compatibility #11496

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

adrianinsaval
Copy link
Member

vtkMTimeType was introduced in vtk 7.1 so minimum required vtk version with this is 7.1 which available on ubuntu 20.04

@wwmayer

@@ -1026,7 +1026,12 @@ void SMDS_UnstructuredGrid::BuildLinks()
GetLinks()->Allocate(this->GetNumberOfPoints());
GetLinks()->Register(this);
//FIXME: vtk9
#if VTK_VERSION_NUMBER < VTK_VERSION_CHECK(9,3,0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are VTK_VERSION_NUMBER and VTK_VERSION_CHECK are defined?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://kitware.github.io/paraview-docs/latest/cxx/vtkVersionMacros_8h.html

I'm not sure whre it gets included but compilation suceeded for me on arch and on ubuntu

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hhhmmm I'm not finding these on 7.1.1 source code though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +1029 to +1034
#if VTK_VERSION_NUMBER < VTK_VERSION_CHECK(9,3,0)
GetLinks()->BuildLinks(this);
#else
GetLinks()->SetDataSet(this);
GetLinks()->BuildLinks();
#endif
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about:

Suggested change
#if VTK_VERSION_NUMBER < VTK_VERSION_CHECK(9,3,0)
GetLinks()->BuildLinks(this);
#else
GetLinks()->SetDataSet(this);
GetLinks()->BuildLinks();
#endif
#if VTK_MAJOR_VERSION >= 9 && VTK_MINOR_VERSION >= 3
GetLinks()->SetDataSet(this);
GetLinks()->BuildLinks();
#else
GetLinks()->BuildLinks(this);
#endif

these should be available on 7.1: https://gitlab.kitware.com/vtk/vtk/-/blob/v7.1.0/Common/Core/vtkVersionMacros.h.in?ref_type=tags

@wwmayer
Copy link
Contributor

wwmayer commented Nov 23, 2023

I think the PR should be fine as the version check macro is used inside the VTK_CELL_ARRAY_V2 which IIRC is also defined for >= vtk8.

@wwmayer wwmayer merged commit d0fb2b8 into FreeCAD:main Nov 23, 2023
8 checks passed
@adrianinsaval adrianinsaval deleted the vtk9.3 branch November 24, 2023 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants